<?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 datasets to one excel file in multiple sheets. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701818#M25816</link>
    <description>Thanks a lot.</description>
    <pubDate>Thu, 26 Nov 2020 13:16:24 GMT</pubDate>
    <dc:creator>ranikeka</dc:creator>
    <dc:date>2020-11-26T13:16:24Z</dc:date>
    <item>
      <title>Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701795#M25809</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I would like to Export multiple SAS datasets to one excel file in multiple sheets. Please help with any macro code ?&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 26 Nov 2020 11:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701795#M25809</guid>
      <dc:creator>ranikeka</dc:creator>
      <dc:date>2020-11-26T11:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701799#M25810</link>
      <description>&lt;P&gt;Define "multiple datasets". Are these datasets in different libraries, or all in one library? Do they share a common naming structure (e.g. all dataset names start with the same string)?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701799#M25810</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-26T11:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701804#M25811</link>
      <description>&lt;P&gt;I am surprised that non of the solution already posted for this problem fits your needs.&lt;/P&gt;
&lt;P&gt;If you have AccessTo PcFiles licensed, maybe libname + proc copy is all you need. You won't need a macro, most likely.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701804#M25811</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-11-26T11:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701809#M25812</link>
      <description>No macro need.&lt;BR /&gt;If all your sas dataset are under the same fold :&lt;BR /&gt;&lt;BR /&gt;libname x xlsx 'c:\temp\want.xlsx';&lt;BR /&gt;libname data v9 'd:\sas\';&lt;BR /&gt;proc copy in=data out=x;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 26 Nov 2020 12:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701809#M25812</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-11-26T12:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701811#M25813</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Yes they all in same library and with same structure name_a,name_b etc..&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 26 Nov 2020 12:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701811#M25813</guid>
      <dc:creator>ranikeka</dc:creator>
      <dc:date>2020-11-26T12:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701815#M25814</link>
      <description>&lt;P&gt;First select the names:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select memname into :dsnames separated by " "
from dictionary.tables
where libname = "LIBRARY" and memname like '%NAME';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then copy to Excel:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ex xlsx "/path to your Excel file";

proc copy in=library out=ex;
select &amp;amp;dsnames.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or do it in one step with a wildcard:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ex xlsx "/path to your Excel file";

proc copy in=library out=ex;
select name:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The first selection method allows you to use more complicated selection rules.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 12:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701815#M25814</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-26T12:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701816#M25815</link>
      <description>Great and many thanks &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;</description>
      <pubDate>Thu, 26 Nov 2020 13:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701816#M25815</guid>
      <dc:creator>ranikeka</dc:creator>
      <dc:date>2020-11-26T13:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple SAS datasets to one excel file in multiple sheets.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701818#M25816</link>
      <description>Thanks a lot.</description>
      <pubDate>Thu, 26 Nov 2020 13:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Export-multiple-SAS-datasets-to-one-excel-file-in-multiple/m-p/701818#M25816</guid>
      <dc:creator>ranikeka</dc:creator>
      <dc:date>2020-11-26T13:16:24Z</dc:date>
    </item>
  </channel>
</rss>

