<?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 Export to Excel 07 in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53488#M758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Excelcs engine worked. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 14:43:00 GMT</pubDate>
    <dc:creator>FD</dc:creator>
    <dc:date>2011-08-24T14:43:00Z</dc:date>
    <item>
      <title>Export to Excel 07</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53486#M756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with exporting sas datasets to Excel. I am using SAS 9.2 on windows 7 64 bits and MS 2007. I understand that SAS does not export to MS 2007. So, I used the old excel format and the files generated were corrupted. Below is the code I am using to&amp;nbsp; export multiple datasets into one excel file with each dataset in a different tab. Any help would be highly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options mprint macrogen symbolgen mlogic;&lt;/P&gt;&lt;P&gt;%macro exportexcel9(mylibrary=, mylibref=, myexcel=);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname &amp;amp;mylibref &amp;amp;mylibrary;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table tablemems as&lt;/P&gt;&lt;P&gt;select * from dictionary.tables &lt;/P&gt;&lt;P&gt;where libname="&amp;amp;mylibref";&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_; set tablemems end=last;&lt;/P&gt;&lt;P&gt;call symput('sheetm'||left(_n_),trim(memname));&lt;/P&gt;&lt;P&gt;if last then call symput('counter',_n_);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%do i= 1 %to &amp;amp;counter;&lt;/P&gt;&lt;P&gt;proc export data=&amp;amp;mylibref..&amp;amp;&amp;amp;sheetm&amp;amp;i outfile=&amp;amp;myexcel dbms=xls replace;&lt;/P&gt;&lt;P&gt;sheet="&amp;amp;&amp;amp;sheetm&amp;amp;i";&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend exportexcel9;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp options(default_column_width="7.5, 7.5, 5, 7.5, 7.5" width_fudge='0.75');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%exportexcel9(mylibrary="C:\Users\export",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* library where the sas datasets live */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mylibref=EXPORT,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* libref for the library use UPPERCASE */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myexcel="C:\Users\data.xls");&amp;nbsp; /* location of the excel file&amp;nbsp; */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 05:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53486#M756</guid>
      <dc:creator>FD</dc:creator>
      <dc:date>2011-08-24T05:00:17Z</dc:date>
    </item>
    <item>
      <title>Export to Excel 07</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53487#M757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried it with the excelcs engine?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 13:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53487#M757</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-24T13:41:33Z</dc:date>
    </item>
    <item>
      <title>Export to Excel 07</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53488#M758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Excelcs engine worked. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 14:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Export-to-Excel-07/m-p/53488#M758</guid>
      <dc:creator>FD</dc:creator>
      <dc:date>2011-08-24T14:43:00Z</dc:date>
    </item>
  </channel>
</rss>

