<?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 tabulate and negative numbers in Excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-and-negative-numbers-in-Excel/m-p/38091#M5346</link>
    <description>I am using Excexp tagset and cannot seem to get negative numbers to come out as numeric.  They are currently coming out as text.  &lt;BR /&gt;
&lt;BR /&gt;
My code looks correct, but I cannot seem to get it to work.&lt;BR /&gt;
[pre]&lt;BR /&gt;
glrecovery  =''*sum='Recovery $' *f=dollar21.2*&lt;BR /&gt;
[style=[tagattr="format:$###,###,## ; $-###,###,##"]]&lt;BR /&gt;
[/pre]</description>
    <pubDate>Mon, 21 Jun 2010 01:32:19 GMT</pubDate>
    <dc:creator>steve_citi</dc:creator>
    <dc:date>2010-06-21T01:32:19Z</dc:date>
    <item>
      <title>tabulate and negative numbers in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-and-negative-numbers-in-Excel/m-p/38091#M5346</link>
      <description>I am using Excexp tagset and cannot seem to get negative numbers to come out as numeric.  They are currently coming out as text.  &lt;BR /&gt;
&lt;BR /&gt;
My code looks correct, but I cannot seem to get it to work.&lt;BR /&gt;
[pre]&lt;BR /&gt;
glrecovery  =''*sum='Recovery $' *f=dollar21.2*&lt;BR /&gt;
[style=[tagattr="format:$###,###,## ; $-###,###,##"]]&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 21 Jun 2010 01:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-and-negative-numbers-in-Excel/m-p/38091#M5346</guid>
      <dc:creator>steve_citi</dc:creator>
      <dc:date>2010-06-21T01:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: tabulate and negative numbers in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-and-negative-numbers-in-Excel/m-p/38092#M5347</link>
      <description>Hi:&lt;BR /&gt;
  I find that if I remove the dollar21.2 from the SAS end and ONLY have the Excel format, that in SAS 9.2 and Excel 2007 and tagset version v1.94, that the negative numbers -are- numeric fields in Excel. This means that any SAS output will not have $$, but if you are only using Excel, this should not be an issue.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  glrecovery = height *weight*age;&lt;BR /&gt;
  if sex = 'F' then glrecovery = glrecovery * -1;&lt;BR /&gt;
run;&lt;BR /&gt;
                 &lt;BR /&gt;
ods html file='c:\temp\testneg.html' style=sasweb;&lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\testneg.xls' style=sasweb;&lt;BR /&gt;
  proc tabulate data=test;&lt;BR /&gt;
    class age sex;&lt;BR /&gt;
    var glrecovery;&lt;BR /&gt;
    table sex*age,&lt;BR /&gt;
          glrecovery  =''*sum='Recovery $' *f=best21.2*[style=[tagattr="format:$###,###,## ; $-###,###,##"]];&lt;BR /&gt;
  run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 21 Jun 2010 13:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-and-negative-numbers-in-Excel/m-p/38092#M5347</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-06-21T13:49:26Z</dc:date>
    </item>
  </channel>
</rss>

