<?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: Unable to get comma seperated values in proc report after every 3 digits in excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439078#M109516</link>
    <description>&lt;P&gt;ODS tagsets.excelxp became obsolete after ODS EXCEL&amp;nbsp;. ODS EXCEL handles SAS format a lot better, if you are running SAS&amp;nbsp;9.4, then the following code should meet your need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='path/test.xlsx';

proc report data=test nowd;

columns id amount;

define id / 'EMP ID';

define amount / 'Amount' format=comma20.2;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Feb 2018 21:20:20 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2018-02-21T21:20:20Z</dc:date>
    <item>
      <title>Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438550#M109357</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using&amp;nbsp;LibreOffice Calc&amp;nbsp;for&amp;nbsp; excel output&lt;/P&gt;
&lt;P&gt;unable to get comma separated by 3 digits default it is taking 12,34,678.00&lt;/P&gt;
&lt;P&gt;can I get values as 12,345,678.00&lt;/P&gt;
&lt;P&gt;when ever I am applying any formats or picture formats or convert into character&amp;nbsp;its not working&lt;/P&gt;
&lt;P&gt;either we are getting 12,34,678.00&amp;nbsp; or 1234678.00&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 05:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438550#M109357</guid>
      <dc:creator>santhosh</dc:creator>
      <dc:date>2018-02-20T05:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438770#M109426</link>
      <description>&lt;P&gt;Why are you posting a LIbreOffice question on a SAS Forum?&amp;nbsp; Does this have anything to do with SAS? If so then please show the SAS code you used.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 20:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438770#M109426</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-20T20:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438837#M109457</link>
      <description>&lt;P&gt;Hello Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;LIbreOffice instead of excel we are writing program in sas for output&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;eg&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input id $ amount;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;datalines;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;101 123456789&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;102 987456123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;103 456789123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ods excelxp tagsets file='path/test.xls';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc report data=test nowd;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;columns id amount;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;define id / 'EMP ID';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;define amount / 'Amount' format=comma20.2;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;i am getting values in output as default in excel /&amp;nbsp;LIbreOffice 2 digits seperated&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;101 12,34,56,789&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;102 98,74,56,123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;103 45,67,89,123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;i want output as complete 3 digit numeric seperaot&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;101 123,456,789&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;102 987,456,123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;103 456,789,123&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 01:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/438837#M109457</guid>
      <dc:creator>santhosh</dc:creator>
      <dc:date>2018-02-21T01:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439078#M109516</link>
      <description>&lt;P&gt;ODS tagsets.excelxp became obsolete after ODS EXCEL&amp;nbsp;. ODS EXCEL handles SAS format a lot better, if you are running SAS&amp;nbsp;9.4, then the following code should meet your need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='path/test.xlsx';

proc report data=test nowd;

columns id amount;

define id / 'EMP ID';

define amount / 'Amount' format=comma20.2;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439078#M109516</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2018-02-21T21:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439090#M109521</link>
      <description>&lt;P&gt;The SAS format you use will control how the output looks in normal destinations like listing or html.&amp;nbsp; But if you want to tell Excel how to format the values then you need to use the ODS STYLE option to pass in the Excel format attribute to attach to the cells in the Excel document.&amp;nbsp; Something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;style={tagattr='format:#,##0'}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You might also just check your country code setting for your machine. I suspect that LibreOffice thinks you are in India and so is defaulting to use commas every two digits instead of every three digits.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439090#M109521</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-21T21:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get comma seperated values in proc report after every 3 digits in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439096#M109525</link>
      <description>&lt;P&gt;This is a common requirement when creating Excel files from SAS. Take a look at &lt;STRONG&gt;TAGATTR &lt;/STRONG&gt;which gives more control.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS tagsets.ExcelXP file='path/test.xlsx';
proc report data=test nowd;
columns id amount;
define id / 'EMP ID';
define amount / 'Amount'  style(Column)={tagattr='format:#,##0.00'};
run;
ODS tagsets.ExcelXP CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out these useful papers for more control over data in Excel.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/266-2011.pdf" target="_self"&gt;Don’t Gamble with Your Output: How to Use Microsoft Formats with ODS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Regina-User-Group/Derby-MaintainingSASFormats(Paper)-March2015.pdf" target="_self"&gt;Maintaining Formats when Exporting Data from SAS® into Microsoft® Excel®&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unable-to-get-comma-seperated-values-in-proc-report-after-every/m-p/439096#M109525</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-02-21T21:52:51Z</dc:date>
    </item>
  </channel>
</rss>

