<?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 XLSX libname engine to export multiple data sets into multiple xlsx files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/XLSX-libname-engine-to-export-multiple-data-sets-into-multiple/m-p/804434#M316783</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to export multiple data sets into multiple XLSX files.&lt;/P&gt;
&lt;P&gt;I want to save the XLSX files in specific path (and folder name).&lt;/P&gt;
&lt;P&gt;My question: In the code below I am writing 3 times libname.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to export these 3 data sets into 3 xlsx files by writing only one libname?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname RRR XLSX   '/path/SAS_Into_XLSX_folder/cars.xlsx'
Data RRR.cars;
Set sahelp.cars;
Run;

Libname RRR XLSX   '/path/SAS_Into_XLSX_folder/Class.xlsx'
Data RRR.Class;
Set sashelp.Class;
Run;

Libname  RRR XLSX   '/path/SAS_Into_XLSX_folder/baseball.xlsx'
Data RRR.Class;
Set sashelp.baseball;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 27 Mar 2022 20:00:10 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2022-03-27T20:00:10Z</dc:date>
    <item>
      <title>XLSX libname engine to export multiple data sets into multiple xlsx files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-libname-engine-to-export-multiple-data-sets-into-multiple/m-p/804434#M316783</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to export multiple data sets into multiple XLSX files.&lt;/P&gt;
&lt;P&gt;I want to save the XLSX files in specific path (and folder name).&lt;/P&gt;
&lt;P&gt;My question: In the code below I am writing 3 times libname.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to export these 3 data sets into 3 xlsx files by writing only one libname?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname RRR XLSX   '/path/SAS_Into_XLSX_folder/cars.xlsx'
Data RRR.cars;
Set sahelp.cars;
Run;

Libname RRR XLSX   '/path/SAS_Into_XLSX_folder/Class.xlsx'
Data RRR.Class;
Set sashelp.Class;
Run;

Libname  RRR XLSX   '/path/SAS_Into_XLSX_folder/baseball.xlsx'
Data RRR.Class;
Set sashelp.baseball;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Mar 2022 20:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-libname-engine-to-export-multiple-data-sets-into-multiple/m-p/804434#M316783</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-03-27T20:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX libname engine to export multiple data sets into multiple xlsx files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-libname-engine-to-export-multiple-data-sets-into-multiple/m-p/804439#M316788</link>
      <description>&lt;P&gt;The XLSX engine in the SAS LIBNAME statement must reference a single Excel workbook. If you want to write to three different workbooks as is the case in your example, then you must use three LIBNAME statements. If on the other hand you want to write three SAS datasets to one Excel workbook then only one LIBNAME statement is required.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 21:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-libname-engine-to-export-multiple-data-sets-into-multiple/m-p/804439#M316788</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-03-27T21:18:01Z</dc:date>
    </item>
  </channel>
</rss>

