<?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: Problems while exporting Data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261317#M18211</link>
    <description>&lt;P&gt;I would recommend you use either ods tagsets.excelxp, or libname excel. &amp;nbsp;For an example:&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file="c:\your_fie.xml" options(sheet_name="First Sheet");
proc report data=....
run;

ods tagsets.excelxp options(sheet_name="Second Sheet");
proc report data...
run;

ods tagsets.excelxp close;
&lt;/PRE&gt;
&lt;P&gt;Help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this creates XML output which Excel can read. &amp;nbsp;Libname excel is available in 9.4:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/024-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/024-31.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than for basic tasks, proc export wouldn't be my first choice.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2016 09:57:16 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-04-05T09:57:16Z</dc:date>
    <item>
      <title>Problems while exporting Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261307#M18208</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm facing some problems when exporting data with the code bellow&lt;/P&gt;&lt;P&gt;In the first time it works well but from the second on it add a new sheet to the file instead &amp;nbsp;of replace it a create also a new file with the same name but format&amp;nbsp;.BAK&lt;/P&gt;&lt;P&gt;Please help me, i want export data to several places that's why i don't want to use the predefined exporting ways.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export 
  data=WORK.DCE_RACIO
  dbms=xlsx 
  outfile="\\file1\DNV\06_OUTRAS_DIR\DCE\Apólices.xlsx" 
  replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 09:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261307#M18208</guid>
      <dc:creator>Uriel</dc:creator>
      <dc:date>2016-04-05T09:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while exporting Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261317#M18211</link>
      <description>&lt;P&gt;I would recommend you use either ods tagsets.excelxp, or libname excel. &amp;nbsp;For an example:&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file="c:\your_fie.xml" options(sheet_name="First Sheet");
proc report data=....
run;

ods tagsets.excelxp options(sheet_name="Second Sheet");
proc report data...
run;

ods tagsets.excelxp close;
&lt;/PRE&gt;
&lt;P&gt;Help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this creates XML output which Excel can read. &amp;nbsp;Libname excel is available in 9.4:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/024-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/024-31.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than for basic tasks, proc export wouldn't be my first choice.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 09:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261317#M18211</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-04-05T09:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while exporting Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261320#M18212</link>
      <description>RW9 many thank for your answer;&lt;BR /&gt;&lt;BR /&gt;As a new one, I'm afraid i have to study more in order to aply your sujection (help).&lt;BR /&gt;&lt;BR /&gt;Cheers!!</description>
      <pubDate>Tue, 05 Apr 2016 10:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261320#M18212</guid>
      <dc:creator>Uriel</dc:creator>
      <dc:date>2016-04-05T10:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while exporting Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261554#M18218</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Regarding: &amp;nbsp;In the first time it works well but from the second on it add a new sheet to the file instead &amp;nbsp;of replace it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You need to specify the sheet option to replace a specific sheet, for example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export 
  data=WORK.DCE_RACIO
  dbms=xlsx 
  outfile="\\file1\DNV\06_OUTRAS_DIR\DCE\Apólices.xlsx" 
  replace;
  sheet="DCE_RACIO";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, I do agree with the accepted solution that ODS output is best and most versatile - but it is also very complicated as you noticed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regarding the new file that is created: &amp;nbsp;this is what happens when you attempt to create a file that already exists. &amp;nbsp;SAS automatically renames the existing file to save it for you, by replacing the file extension with ".bak".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can enhance proc export by putting it inside a macro or do loop, and then using macro variables in the file name, you can output multiple files fairly easy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/261554#M18218</guid>
      <dc:creator>k_o</dc:creator>
      <dc:date>2016-04-05T22:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while exporting Data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/262034#M18231</link>
      <description>k_o&lt;BR /&gt;Many thanks for the hint, the problem keeps but at least i can name the sheets while i learn how to use ODS</description>
      <pubDate>Thu, 07 Apr 2016 10:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problems-while-exporting-Data/m-p/262034#M18231</guid>
      <dc:creator>Uriel</dc:creator>
      <dc:date>2016-04-07T10:29:57Z</dc:date>
    </item>
  </channel>
</rss>

