<?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 How to preserve the format while exporting a Dataset into Excel 2010 xlsx in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-preserve-the-format-while-exporting-a-Dataset-into-Excel/m-p/468657#M30401</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know&amp;nbsp; if there is a sample way to preserve the dataset format while exporting the output results from SAS to an xlsx file.&lt;/P&gt;&lt;P&gt;Please note that I am using proc export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro Export2;&lt;BR /&gt;proc export&lt;BR /&gt;data=Final&lt;BR /&gt;dbms=xlsx&lt;BR /&gt;outfile="\\iagsrvfic01\report.xlsx"&lt;BR /&gt;replace;&lt;BR /&gt;sheet=Rate;&lt;BR /&gt;run;&lt;BR /&gt;%mend Export2;&lt;/P&gt;&lt;P&gt;%Export2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried ODS Tagset.ExcelXP but I received an error message due to the Excel format file (xlsx instead of xls)&lt;/P&gt;&lt;P&gt;ODS Tagset.ExcelXP file=&lt;SPAN&gt;"\\iagsrvfic01\&lt;/SPAN&gt;&lt;SPAN&gt;report.xlsx&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;nbsp;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PROC PRINT DATA=Final;&lt;BR /&gt;VAR&amp;nbsp;var1 var2 var3;&lt;BR /&gt;VAR&amp;nbsp;var4 var5 / style={TAGATTR='format:0.00'};&lt;BR /&gt;RUN;&lt;BR /&gt;ODS tagsets.ExcelXP CLOSE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jun 2018 12:04:48 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2018-06-08T12:04:48Z</dc:date>
    <item>
      <title>How to preserve the format while exporting a Dataset into Excel 2010 xlsx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-preserve-the-format-while-exporting-a-Dataset-into-Excel/m-p/468657#M30401</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know&amp;nbsp; if there is a sample way to preserve the dataset format while exporting the output results from SAS to an xlsx file.&lt;/P&gt;&lt;P&gt;Please note that I am using proc export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro Export2;&lt;BR /&gt;proc export&lt;BR /&gt;data=Final&lt;BR /&gt;dbms=xlsx&lt;BR /&gt;outfile="\\iagsrvfic01\report.xlsx"&lt;BR /&gt;replace;&lt;BR /&gt;sheet=Rate;&lt;BR /&gt;run;&lt;BR /&gt;%mend Export2;&lt;/P&gt;&lt;P&gt;%Export2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried ODS Tagset.ExcelXP but I received an error message due to the Excel format file (xlsx instead of xls)&lt;/P&gt;&lt;P&gt;ODS Tagset.ExcelXP file=&lt;SPAN&gt;"\\iagsrvfic01\&lt;/SPAN&gt;&lt;SPAN&gt;report.xlsx&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;nbsp;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PROC PRINT DATA=Final;&lt;BR /&gt;VAR&amp;nbsp;var1 var2 var3;&lt;BR /&gt;VAR&amp;nbsp;var4 var5 / style={TAGATTR='format:0.00'};&lt;BR /&gt;RUN;&lt;BR /&gt;ODS tagsets.ExcelXP CLOSE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 12:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-preserve-the-format-while-exporting-a-Dataset-into-Excel/m-p/468657#M30401</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-06-08T12:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to preserve the format while exporting a Dataset into Excel 2010 xlsx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-preserve-the-format-while-exporting-a-Dataset-into-Excel/m-p/468670#M30403</link>
      <description>&lt;P&gt;No, proc export is a basic dump of the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use ods tagsets.excelxp, which can create nice outputs.&amp;nbsp; The thing you get is not an error, it is a warning from Excel.&amp;nbsp; It is telling you that the file you have - the output from the tagsets - is XML, yet you have given it the file extension XLSX.&amp;nbsp; So Excel is telling you that this does not match.&amp;nbsp; It is again, not an error, its it perfectly understandable.&amp;nbsp; Call the output file xml, and then open it with Excel (not double click on it which will defaut to opening with browser).&amp;nbsp; The file extension is important, and this tells programs what the file is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use the newer one ods excel:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p09n5pw9ol0897n1qe04zeur27rv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p09n5pw9ol0897n1qe04zeur27rv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Which creates actual xlsx files, but you have to have a recent SAS version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 12:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-preserve-the-format-while-exporting-a-Dataset-into-Excel/m-p/468670#M30403</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-08T12:41:22Z</dc:date>
    </item>
  </channel>
</rss>

