<?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 Export to Excel (.xls) -- losing comma formatting in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132030#M35882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the proc export procedure in base SAS (code).&amp;nbsp; I do not use SAS Enterprise Guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2013 20:49:20 GMT</pubDate>
    <dc:creator>WLP165</dc:creator>
    <dc:date>2013-07-11T20:49:20Z</dc:date>
    <item>
      <title>Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132026#M35878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run a Proc Export procedure to create an Excel (.xls) file from a SAS dataset, but I keep losing the comma formatting in the resultant Excel file from numbers that I knew had it in the SAS dataset used as the input.&amp;nbsp; I currently use PC SAS 9.2, 32-bit version.&amp;nbsp; If helpful, the code I used is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data = nsc.msa_ftp_final_comma&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; outfile = "c:\test\msa_ftp_final_comma.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; dbms=excel replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to restore the lost comma formattting manually by opening up each Excel file and doing "Format Cells" on the applicable columns.&amp;nbsp; I also tried using the dbms=xls option but it creates a messed-up Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 16:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132026#M35878</guid>
      <dc:creator>WLP165</dc:creator>
      <dc:date>2013-07-11T16:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132027#M35879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your log, it states that formats are not outputted to excel using proc export.&lt;/P&gt;&lt;P&gt;Search on here to find the solution as this question has been asked/answered many times.&lt;/P&gt;&lt;P&gt;KEYWORDS: Formats Excel Export&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 16:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132027#M35879</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-11T16:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132028#M35880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rezza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp; I'll search and try to find a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did check my SAS Log but it mentions nothing about "formats are not outputted to excel using proc export."&amp;nbsp; It just says that the "range/sheet was successfully created."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 19:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132028#M35880</guid>
      <dc:creator>WLP165</dc:creator>
      <dc:date>2013-07-11T19:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132029#M35881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the note I usually get, but I export using a libname and are you're using proc export, through the point and click or code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: SAS variable labels, formats, and lengths are not written to DBMS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 20:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132029#M35881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-11T20:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132030#M35882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the proc export procedure in base SAS (code).&amp;nbsp; I do not use SAS Enterprise Guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 20:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132030#M35882</guid>
      <dc:creator>WLP165</dc:creator>
      <dc:date>2013-07-11T20:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel (.xls) -- losing comma formatting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132031#M35883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Reeza's note is correct. I do not believe PROC EXPORT sends you the informative note; although the LIBNAME engine does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But, usually, the SAS formats, labels, etc are not sent to Excel with "export" methods in general. So if you use certain SAS formats on your variables, such as Z (for leading zeroes) or other formats, Excel doesn't get them, so it uses a default format when it loads the sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is one of the reasons why people use ODS methods to send output to files for Excel to open -- because ODS has a way to send Microsoft-specific formatting instructions to Excel. But depending on what you need to do, it may be faster to reformat the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 21:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-xls-losing-comma-formatting/m-p/132031#M35883</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-07-11T21:24:54Z</dc:date>
    </item>
  </channel>
</rss>

