<?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 Proc Export to Excel: Extra Sheets? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-Extra-Sheets/m-p/66492#M18998</link>
    <description>I'm using Proc Export to copy two datasets to an Excel (xlsx) spreadsheet (code below). Everything works ok except that I get three extra blank sheets (named sheet1, sheet2 and sheet3) before my two output sheets (Micro and Chem). Can anyone tell me what's going on? Thanks!&lt;BR /&gt;
&lt;BR /&gt;
Jeff&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT &lt;BR /&gt;
      DATA=qc.micro_sorted&lt;BR /&gt;
      OUTFILE= "&amp;amp;req_dir\R110185 Listing.xlsx" &lt;BR /&gt;
      DBMS=EXCEL &lt;BR /&gt;
      REPLACE;&lt;BR /&gt;
   SHEET="Micro";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT &lt;BR /&gt;
      DATA=qc.chem_sorted&lt;BR /&gt;
      OUTFILE= "&amp;amp;req_dir\R110185 Listing.xlsx" &lt;BR /&gt;
      DBMS=EXCEL &lt;BR /&gt;
      REPLACE;&lt;BR /&gt;
   SHEET="Chem";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Additionally, I figured out that I only get the extra sheets when the spreadsheet already exists but don't get them if this is run without the spreadsheet already existing.

Message was edited by: JCS</description>
    <pubDate>Tue, 17 May 2011 17:41:04 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-05-17T17:41:04Z</dc:date>
    <item>
      <title>Proc Export to Excel: Extra Sheets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-Extra-Sheets/m-p/66492#M18998</link>
      <description>I'm using Proc Export to copy two datasets to an Excel (xlsx) spreadsheet (code below). Everything works ok except that I get three extra blank sheets (named sheet1, sheet2 and sheet3) before my two output sheets (Micro and Chem). Can anyone tell me what's going on? Thanks!&lt;BR /&gt;
&lt;BR /&gt;
Jeff&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT &lt;BR /&gt;
      DATA=qc.micro_sorted&lt;BR /&gt;
      OUTFILE= "&amp;amp;req_dir\R110185 Listing.xlsx" &lt;BR /&gt;
      DBMS=EXCEL &lt;BR /&gt;
      REPLACE;&lt;BR /&gt;
   SHEET="Micro";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT &lt;BR /&gt;
      DATA=qc.chem_sorted&lt;BR /&gt;
      OUTFILE= "&amp;amp;req_dir\R110185 Listing.xlsx" &lt;BR /&gt;
      DBMS=EXCEL &lt;BR /&gt;
      REPLACE;&lt;BR /&gt;
   SHEET="Chem";&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Additionally, I figured out that I only get the extra sheets when the spreadsheet already exists but don't get them if this is run without the spreadsheet already existing.

Message was edited by: JCS</description>
      <pubDate>Tue, 17 May 2011 17:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-Extra-Sheets/m-p/66492#M18998</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-05-17T17:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel: Extra Sheets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-Extra-Sheets/m-p/66493#M18999</link>
      <description>We don't have the ability to export directly to Excel, so I don't know about this, but I do know that Excel will often open a new workbook with multiple sheets - default tends to be three unless you change that.  &lt;BR /&gt;
&lt;BR /&gt;
When you say you only get the sheets when spreadsheet already exists, does that mean when you originally create the spreadsheet via SAS, you don't get it, but then you Replace into it, it adds three blank sheets?  Or do you mean you've created an workbook via Excel and then export into it?</description>
      <pubDate>Tue, 17 May 2011 19:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-Extra-Sheets/m-p/66493#M18999</guid>
      <dc:creator>stateworker</dc:creator>
      <dc:date>2011-05-17T19:50:57Z</dc:date>
    </item>
  </channel>
</rss>

