<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: special missing values in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166796#M12218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if I did not show exactly where my problem is. I need a numeric field in excel in a specific format. To get this, the xml written by SAS needs to show "real number" in most places, but specific Characters (such as . , X, B) in others.&lt;/P&gt;&lt;P&gt;I hoped to achieve this with special missing values, but cant get it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I just missed this line while copying my code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;missing&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=B;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 11:10:33 GMT</pubDate>
    <dc:creator>christa</dc:creator>
    <dc:date>2014-04-04T11:10:33Z</dc:date>
    <item>
      <title>special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166790#M12212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am using special missing values to differentiate between different "nothings" in a numeric column.&lt;/P&gt;&lt;P&gt;Is there a way to get these to excel via ods tagsets.excelxp?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 13:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166790#M12212</guid>
      <dc:creator>christa</dc:creator>
      <dc:date>2014-04-03T13:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166791#M12213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you clarify with an example?&amp;nbsp; Your proc report within the ods tageset open/close should print all text out, however its not a given that what Excel displays is the same as witihin SAS.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166791#M12213</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-03T14:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166792#M12214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is that it is not text, but numeric.&lt;/P&gt;&lt;P&gt;and all missing values, wether normal or special, show in excel as .&lt;/P&gt;&lt;P&gt;in SAS i am fine.&lt;/P&gt;&lt;P&gt;I will post an example tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166792#M12214</guid>
      <dc:creator>christa</dc:creator>
      <dc:date>2014-04-03T14:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166793#M12215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you could convert the column to character prior to exporting to Excel?&amp;nbsp; Will wait to see example.&lt;/P&gt;&lt;P&gt;options missing='$';&lt;BR /&gt;data have;&lt;BR /&gt;&amp;nbsp; attrib test format=8.;&lt;BR /&gt;&amp;nbsp; test=12;&lt;BR /&gt;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; test=.;&lt;BR /&gt;&amp;nbsp; output;&lt;BR /&gt;run;&lt;BR /&gt;data want (drop=test);&lt;BR /&gt;&amp;nbsp; set have;&lt;BR /&gt;&amp;nbsp; attrib text_for_export format=$10.;&lt;BR /&gt;&amp;nbsp; test_for_export=strip(put(test,best.));&lt;BR /&gt;run;&lt;BR /&gt;proc export...;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166793#M12215</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-03T14:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166794#M12216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left;"&gt;&lt;BR /&gt;Here is my example (how can i post it nicely?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 09:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166794#M12216</guid>
      <dc:creator>christa</dc:creator>
      <dc:date>2014-04-04T09:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166795#M12217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, not sure what your example is trying to do.&amp;nbsp; I have changed your code slightly to get it working, however the output from the tabulate looks pretty much identical to the input dataset other then three new variables _TYPE_, _PAGE_, _TABLE.&amp;nbsp; Also I note that the proc tabulate itself is not honoring the missing value per the dataset as you have no indicator - only for the datastep.&amp;nbsp; So try using "options missing=B" at the start of your program. &lt;/P&gt;&lt;P&gt;This code works and shows 'B' in the output, it does this by putting the value into a character variable and using that.&amp;nbsp; (Note you can use the out= from the proc tabulate, and then post process that before outputting to Excel).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing=B;&lt;BR /&gt;data test;&lt;BR /&gt;&amp;nbsp; missing B; &lt;BR /&gt;&amp;nbsp; input v_id $ v_value;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1 &lt;BR /&gt;2 0 &lt;BR /&gt;3 .B &lt;BR /&gt;4 0 &lt;BR /&gt;5 -1&lt;BR /&gt;6 55 &lt;BR /&gt;8 4003&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data inter;&lt;BR /&gt;&amp;nbsp; set test;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attrib my_val format=$10.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_val=strip(put(v_value,best.));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;BR /&gt;ods tagsets.excelxp file="S:\Temp\Rob\test.xls" style=statistical options (frozen_headers="1" absolute_column_width="none" zoom="80");&lt;BR /&gt;ods tagsets.excelxp options (sheet_name="Test");&lt;BR /&gt;proc report data=work.inter nowd split="~"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(header)=[background = #DBE5F1 foreground = #000099 font_weight = bold ]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)=[just=l borderrightcolor=white borderleftcolor=white&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderleftwidth=1 bordertopcolor=white borderbottomcolor=white &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderrightwidth=1 bordertopwidth=1 borderbottomwidth=1];&lt;BR /&gt;&amp;nbsp; columns v_id my_val;&lt;BR /&gt;&amp;nbsp; define v_id / "Id";&lt;BR /&gt;&amp;nbsp; define my_val / "Value";&lt;BR /&gt;run;&lt;BR /&gt;ods tagsets.excelxp close;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 10:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166795#M12217</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-04T10:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166796#M12218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry if I did not show exactly where my problem is. I need a numeric field in excel in a specific format. To get this, the xml written by SAS needs to show "real number" in most places, but specific Characters (such as . , X, B) in others.&lt;/P&gt;&lt;P&gt;I hoped to achieve this with special missing values, but cant get it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I just missed this line while copying my code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;missing&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=B;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 11:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166796#M12218</guid>
      <dc:creator>christa</dc:creator>
      <dc:date>2014-04-04T11:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166797#M12219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid I don't know of a direct way of doing that.&amp;nbsp; The specific missing character functionality you are talking about is a SAS specific item, Excel does not have that as missing is just missing.&amp;nbsp; So from before, you would need to convert it character for Excel to show characters.&amp;nbsp; The only other options I can think of is:&lt;/P&gt;&lt;P&gt;- Change your actual missings to a specific number which can't happen, e.g. -999999.&lt;/P&gt;&lt;P&gt;- Post process the XML file which you generated, so read it in as a text file and search for:&lt;/P&gt;&lt;P&gt;&amp;lt;Cell ss:StyleID="data__l1" ss:Index="1"&amp;gt;&amp;lt;Data ss:Type="Number"&amp;gt; xx &amp;lt;/Data&amp;gt;&amp;lt;/Cell&amp;gt;&lt;/P&gt;&lt;P&gt;Then write your specific character in where the xx is.&lt;/P&gt;&lt;P&gt;- Alternatively use Excel to replace blanks after export.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166797#M12219</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-04T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166798#M12220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lateral answer for your&amp;nbsp; "nicely"&amp;nbsp;&amp;nbsp; question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My trick is to copy the sas colored code from the pgm file to a new temporary word file &lt;SPAN style="text-decoration: underline;"&gt;without too much space gap between lines&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;then in a second step copy again the colored code from word to here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AW&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166798#M12220</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2014-04-04T12:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: special missing values</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166799#M12221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="3350" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;you might have success using traffic lighting to set the background formatting for distinctive missing values&lt;/P&gt;&lt;P&gt;and remembering that the excel custom format allows separate custom formats (separated by semi-colons) for positive negative zero and text values.&lt;/P&gt;&lt;P&gt;However this approach wouldn't distinguish between different special missing values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 14:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/special-missing-values/m-p/166799#M12221</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-04-04T14:11:40Z</dc:date>
    </item>
  </channel>
</rss>

