<?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: multi excel files into single excel file with multiple sheets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786023#M250900</link>
    <description>&lt;P&gt;Are the Excel sheets created by SAS already? If so, you could modify your code to create a single file - in that case please show an example of your current code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;this is something I would solve using VBS not SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204061"&gt;@KalaBhairava&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Can anybody help me to solve this : I want to convert multi excel files into single excel file with multiple sheets by using sas procedures&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Dec 2021 16:46:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-12-14T16:46:32Z</dc:date>
    <item>
      <title>multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/785992#M250894</link>
      <description>Can anybody help me to solve this : I want to convert multi excel files into single excel file with multiple sheets by using sas procedures</description>
      <pubDate>Tue, 14 Dec 2021 13:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/785992#M250894</guid>
      <dc:creator>KalaBhairava</dc:creator>
      <dc:date>2021-12-14T13:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/785999#M250896</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204061"&gt;@KalaBhairava&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Can anybody help me to solve this : I want to convert multi excel files into single excel file with multiple sheets by using sas procedures&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You would probably get better results using Excel tools to manipulate Excel files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try to convert the original sheets into datasets and then write them back out to a new XLSX file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you have XLSX files the flow would look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in1 xlsx 'filename1.xlsx';
libname in2 xlsx 'filename2.xlsx';
libname out xlsx 'filename_new.xlsx';
data out.sheet1; set in1.sheet1; run;
data out.sheet2; set in2.sheet1; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You will need to take care that the names you give the "datasets" or sheets in the new file are unique, which might require renaming some of them , as in the little example above.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 13:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/785999#M250896</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-14T13:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786023#M250900</link>
      <description>&lt;P&gt;Are the Excel sheets created by SAS already? If so, you could modify your code to create a single file - in that case please show an example of your current code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;this is something I would solve using VBS not SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204061"&gt;@KalaBhairava&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Can anybody help me to solve this : I want to convert multi excel files into single excel file with multiple sheets by using sas procedures&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 16:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786023#M250900</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-14T16:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786101#M250949</link>
      <description>&lt;P&gt;I have generated excel files by using SAS and I want to combined those individual excel files into single with multiple sheets&amp;nbsp; without disturbing titles and footnotes.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 05:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786101#M250949</guid>
      <dc:creator>KalaBhairava</dc:creator>
      <dc:date>2021-12-15T05:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786102#M250950</link>
      <description>&lt;P&gt;Yes those are generated by using SAS, for each table I generated separate excel file with different titles and footnotes , now I want to combined those into single file with different sheet without disturbing titles and footnotes.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 06:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786102#M250950</guid>
      <dc:creator>KalaBhairava</dc:creator>
      <dc:date>2021-12-15T06:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786134#M250964</link>
      <description>&lt;P&gt;TITLES and FOOTNOTES suggest your create your Excel files with ODS. So you simply use one starting ODS EXCEL OPTIONS(SHEET_INTERVAL="None") and one ending ODS EXCEL CLOSE statement, and in between ODS EXCEL OPTIONS(SHEET_INTERVAL="Now" SHEET_NAME="xxx") statements.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 10:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786134#M250964</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-15T10:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: multi excel files into single excel file with multiple sheets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786186#M250980</link>
      <description>&lt;P&gt;If the files already exist then use non-SAS tools to combine them.&amp;nbsp; Excel or powershell probably have ways to do this via programming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you are making the files you could make the single file to start with.&amp;nbsp; Or if you need both the individual files and the combined file make them both at the same time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel (id=multiple) file='bigfile.xlsx' ;

ods excel (id=single) file='single_file1.xlsx';

proc print data=file1;
run;

ods excel (id=single) close;

ods excel (id=single) file='single_file2.xlsx';

proc print data=file2;
run;

ods excel (id=single) close;
ods execl (id=multiple) close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Dec 2021 15:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multi-excel-files-into-single-excel-file-with-multiple-sheets/m-p/786186#M250980</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-15T15:08:14Z</dc:date>
    </item>
  </channel>
</rss>

