<?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: Proc report and ods excel xp question in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303235#M17123</link>
    <description>Hi: When you use TAGSETS.EXCELXP, Excel frequently does NOT use SAS formats for numeric cells or honor the number of decimal places you specify in your SAS formats. You usually need to use the TAGATTR style attribute to specify a MICROSOFT format to format the number. Refer to page 8-9 in this paper, &lt;A href="https://support.sas.com/resources/papers/proceedings11/266-2011.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt; which shows a Microsoft format for positive, negative and zero values: &lt;BR /&gt;&lt;BR /&gt;cynthia</description>
    <pubDate>Fri, 07 Oct 2016 17:40:22 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2016-10-07T17:40:22Z</dc:date>
    <item>
      <title>Proc report and ods excel xp question</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303201#M17118</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I am expecting data as shown below&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Dollars&lt;BR /&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$5,183&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$3,326&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$2,070&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i am getting the data as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Dollars&lt;BR /&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$5,183&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$3,326&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$2,070&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when i click on the cell it shows 0 but it displays as $. what i shoul do to display as $0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please see the code below and the code is customized for security purposes.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format&amp;nbsp;&lt;BR /&gt;picture dfmt (round)&lt;BR /&gt;low - &amp;lt; 0 = '0000,009)' (mult=.001 prefix='($')&lt;BR /&gt;0 - high = '000,009' (mult=.001 prefix='$');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file = "test.xls" ;&lt;BR /&gt;ods tagsets.ExcelXP options(embedded_titles="no" autofit_height="yes" autofit_width="yes" sheet_interval="none"&lt;BR /&gt;ABSOLUTE_COLUMN_WIDTH='10' sheet_name=test")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data =test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column amt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define amt &amp;nbsp;/ order order=data "Dollars ";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute amt;&lt;BR /&gt;if &amp;nbsp;amt&amp;gt; 0 then do;&lt;BR /&gt;call define (_col_,"format","dfmt.");&lt;BR /&gt;call define (_col_,"style","style={tagattr='format:$###,###'}");&lt;BR /&gt;end;&lt;BR /&gt;else if amt &amp;lt; 0 then do;&lt;BR /&gt;call define (_col_,"format","dfmt.");&lt;BR /&gt;call define (_col_,"style","style={tagattr='format:$###,###'}");&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;call define (_col_,"format","dollar4.");&lt;BR /&gt;call define (_col_,"style","style={tagattr='format:$#'}");&lt;BR /&gt;end;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 15:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303201#M17118</guid>
      <dc:creator>JasonNC</dc:creator>
      <dc:date>2016-10-07T15:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report and ods excel xp question</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303209#M17119</link>
      <description>&lt;P&gt;If the value is missing in the SAS report then it will generally not display as 0 unless you create a format to do so OR have an option to display missing as '0' instead of '.'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the cell look like in SAS output NOT sent to Excel?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 16:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303209#M17119</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-07T16:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report and ods excel xp question</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303235#M17123</link>
      <description>Hi: When you use TAGSETS.EXCELXP, Excel frequently does NOT use SAS formats for numeric cells or honor the number of decimal places you specify in your SAS formats. You usually need to use the TAGATTR style attribute to specify a MICROSOFT format to format the number. Refer to page 8-9 in this paper, &lt;A href="https://support.sas.com/resources/papers/proceedings11/266-2011.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt; which shows a Microsoft format for positive, negative and zero values: &lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 07 Oct 2016 17:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-and-ods-excel-xp-question/m-p/303235#M17123</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-10-07T17:40:22Z</dc:date>
    </item>
  </channel>
</rss>

