<?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: Export multiple sas file into multiple excel worksheet of a single workbook in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814697#M321575</link>
    <description>&lt;P&gt;If your problem is just those three SAS data sets, then use this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export 
  data=aa.suppae
  dbms=xlsx 
  outfile="C:/output/test.xlsx" 
  replace;
  sheet='Suppae';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and repeat three times, changing the file and sheet name as appropriate. Remove the "replace" option on the 2nd and 3rd repeat.&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 11:16:17 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-05-23T11:16:17Z</dc:date>
    <item>
      <title>Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814694#M321572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to export all supplmentary SAS file (suppae, suppdm, suppds) from Supp Library into multiple sheet of a single excel workbook. I use below method and it is working fine for one dataset. Can you please help me how to proceed.&lt;/P&gt;&lt;PRE&gt;libname aa 'C:/supp';
proc export 
  data=aa.suppae
  dbms=xlsx 
  outfile="C:/output/test.xlsx" 
  replace;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2022 11:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814694#M321572</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2022-05-23T11:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814696#M321574</link>
      <description>&lt;P&gt;Do you have access to the XLSX engine? It makes it easy to do what you want, if I'm understanding your question correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:13:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814696#M321574</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2022-05-23T11:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814697#M321575</link>
      <description>&lt;P&gt;If your problem is just those three SAS data sets, then use this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export 
  data=aa.suppae
  dbms=xlsx 
  outfile="C:/output/test.xlsx" 
  replace;
  sheet='Suppae';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and repeat three times, changing the file and sheet name as appropriate. Remove the "replace" option on the 2nd and 3rd repeat.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:16:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814697#M321575</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-23T11:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814698#M321576</link>
      <description>Thank you so much. Its working fine. As I have more dataset, I want the whole code to convert into macro. I am not that much expert in macro. The below code is not working. Can you please help one more time.&lt;BR /&gt;&lt;BR /&gt;%macro export(supp);&lt;BR /&gt;proc export&lt;BR /&gt;data=aa.&amp;amp;supp&lt;BR /&gt;dbms=xlsx&lt;BR /&gt;outfile="C:/output/test.xlsx"&lt;BR /&gt;replace;&lt;BR /&gt;sheet=&amp;amp;supp;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%export(suppds)</description>
      <pubDate>Mon, 23 May 2022 11:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814698#M321576</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2022-05-23T11:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814700#M321578</link>
      <description>&lt;P&gt;Use a LIBNAME, and PROC COPY:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname aa 'C:/supp';
libname xlout xlsx "C:/output/test.xlsx";

proc copy in=aa out=xlout;
select
  suppae
  suppdm
  suppds
;
run;

libname xlout clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want all datasets in the library to be copied, omit the SELECT statement.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814700#M321578</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-23T11:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814701#M321579</link>
      <description>&lt;P&gt;No need to jump into the complexities of writing a macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As in many similar cases, people want to use macros when they are unnecessary. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; shows how to do this without macros.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814701#M321579</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-23T11:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814703#M321580</link>
      <description>Thank you so much. Its working fine getting waring message for every dataset&lt;BR /&gt;'WARNING: Labels exceeding length 32 are not supported by engine XLSX and are being truncated'&lt;BR /&gt;Is it ok?</description>
      <pubDate>Mon, 23 May 2022 11:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814703#M321580</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2022-05-23T11:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple sas file into multiple excel worksheet of a single workbook</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814707#M321582</link>
      <description>&lt;P&gt;You can ignore the message for all practical purposes; to avoid it, create your datasets without labels or labels that fit into 32 characters.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 12:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-sas-file-into-multiple-excel-worksheet-of-a/m-p/814707#M321582</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-23T12:46:52Z</dc:date>
    </item>
  </channel>
</rss>

