<?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: more than one proc export statements in one program in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89591#M25559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you limited to only using proc export?&amp;nbsp; You could use the PC File Server Libname in the following.&amp;nbsp; Unfortunately this method does not allow you to replace an existing table, so you need to perform a delete before each export.&amp;nbsp; I am running Win7 64-bit with a 32-bit MS Excel installation and it works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME XLSFILE PCFILES TYPE=EXCEL PORT=8621 SERVER=LOCALHOST SSPI=NO&amp;nbsp; TYPE = EXCEL VERSION = 2007 PATH = "E:\CLASS.XLSX" MSENGINE = ACE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS CLASS2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE=AGE*2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS CLASS2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME XLSFILE CLEAR;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 23:22:26 GMT</pubDate>
    <dc:creator>Scott_Mitchell</dc:creator>
    <dc:date>2013-07-26T23:22:26Z</dc:date>
    <item>
      <title>more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89577#M25545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Hey all together&lt;/STRONG&gt;&lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to code 4 PROC EXPORT statements in one program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of them referencing the same excel workbook and sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;The code is like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.a.) reading the Excel sheet into a SAS dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.b.) calculating/merging something&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.c.) update the Excel sheet by using PROC EXPORT statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.) doing something sensible like caching data from another remote host....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.a.) reading the Excel sheet into a SAS dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.b.) calculating/merging something&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.c.) update the Excel sheet by using PROC EXPORT statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and so on....iterating 4 times&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;The Problem:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if, according to the log all seems fine.....SAS only executes the first PROC EXPORT statement correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the 2nd, 3rd and 4th PROC EXPORT the new observations are not exported to the excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Code snipped:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* import existing user */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="&amp;amp;workspace.\All-Users-&amp;amp;assigned_year._mail.xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out=smf.old_user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DBMS=excel2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* merge new user and old user into new user dataset */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data smf.cur_user;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set smf.old_user smf.abteicpu;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where user_id like 'XX_____';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep user_id Vorname Name Abteilung Mail EXTERNALMAIL Phone;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* eliminate multiple entries */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=smf.cur_user nodupkey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by user_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* export user including contact data to excel */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC EXPORT data=smf.cur_user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DBMS=excel2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTFILE="&amp;amp;workspace.\All-Users-&amp;amp;assigned_year._mail.xlsx" REPLACE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again.....this code runs 4 times.....before each execution SAS connects to another remote host to collect data (closing endrsubmit before continuing pc processing).....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....the excel sheet "cur_user" is only updated the first time the code runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have any hints and tipps reagarding this strange problem!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Environment:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Windows 7 64bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- SAS 9.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Excel 2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 09:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89577#M25545</guid>
      <dc:creator>hoff_sas</dc:creator>
      <dc:date>2013-07-25T09:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89578#M25546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;the one thing I would suggest is to specify the sheet you want updated: (in your case: &lt;EM&gt;cur_user&lt;/EM&gt;);&lt;/P&gt;&lt;P&gt;I would modify the export to something like this:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PROC EXPORT data=smf.cur_user&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;DBMS=excel2007&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;OUTFILE="&amp;amp;workspace.\All-Users-&amp;amp;assigned_year._mail.xlsx" REPLACE;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;SHEET = "cur_user";&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So now, every time you export your data set, the &lt;EM&gt;cur_user&lt;/EM&gt; sheet will get updated.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Good luck!&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 11:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89578#M25546</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-07-25T11:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89579#M25547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your post.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I am not able to check this before &lt;STRONG&gt;tomorrow morning&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am pretty sure, that I already tried this and deleted &lt;STRONG&gt;SHEET = "cur_user";&lt;/STRONG&gt; because it is implied by the &lt;STRONG&gt;data=smf.cur_user&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll keep you informed.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 13:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89579#M25547</guid>
      <dc:creator>hoff_sas</dc:creator>
      <dc:date>2013-07-25T13:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89580#M25548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as written yesterday....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if I insert the "Sheet = 'cur_user'" statement, the sheet is not updated. And again the log seems fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a.) after proc import&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOTE: 314 observations read from file SMF_OLD_USER&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;b.) after merge end deletion of duplicates&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOTE: ....SMF.CUR_USER has 331 observations and 7 variables&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;c.) after proc export&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NOTE: ....worksheet "cur_user" successfull created&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; however, the worksheet has 314 ovservations. Not 331!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume the problem in incompatibility between the used SAS excel engine and MS Office 2007...&lt;/P&gt;&lt;P&gt;.....I have tried several engines and options.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone know why this problem occur related to my environment,.....please let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 10:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89580#M25548</guid>
      <dc:creator>hoff_sas</dc:creator>
      <dc:date>2013-07-26T10:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89581#M25549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are reading from and writing to the same XLSX file?&lt;/P&gt;&lt;P&gt;Do you have more than one sheet in the file?&lt;/P&gt;&lt;P&gt;If so does that ever work?&amp;nbsp; That is can you really use PROC EXPORT to update a single sheet in an existing file?&lt;/P&gt;&lt;P&gt;If the XLSX file only has one sheet then why not write to a different file name.&amp;nbsp; Or erase the old version before using EXPORT to create the new one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 13:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89581#M25549</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-26T13:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89582#M25550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are reading from and writing to the same XLSX file?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;EM&gt;yes..I do&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Do you have more than one sheet in the file?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;EM&gt;no it is just one sheet&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If so does that ever work?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;EM&gt;Why it should not? It's a simple proc export. But no. It#s the first time I do so.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;That is can you really use PROC EXPORT to update a single sheet in an existing file?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;EM&gt;beacuse it is just one sheet inside....to update the whole workbook is also a possible solution. - and I do so, wen not specifying "sheet= ".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If the XLSX file only has one sheet then why not write to a different file name. Or erase the old version before using EXPORT to create the new one?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;EM&gt;I do not think, that this will help. I'd rather suspect a difference in SAS execution process. I'd rather would understand this process instead of building a workaround. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;But I will try this and keep u informed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks tom...and greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 13:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89582#M25550</guid>
      <dc:creator>hoff_sas</dc:creator>
      <dc:date>2013-07-26T13:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89583#M25551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure this will be of much help but from SAS documentation on the PROC EXPORT procedure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="6" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD align="left" valign="middle" width="20%"&gt;Excel*&lt;/TD&gt;&lt;TD align="left" valign="middle" width="63%"&gt;Excel 97, 2000, 2002, 2003 or 2007 &lt;BR /&gt;spreadsheet (using the LIBNAME statement)&lt;/TD&gt;&lt;TD align="left" valign="middle" width="15%"&gt;.xls &lt;BR /&gt;&lt;P&gt;.xlsb&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;.xlsx&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Not available for Microsoft Windows 64-Bit edition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="6" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD align="left" valign="middle" width="20%"&gt;XLS&lt;/TD&gt;&lt;TD align="left" valign="middle" width="63%"&gt;Excel 97, 2000, 2002, or 2003 &lt;BR /&gt;spreadsheet (using file formats)&lt;/TD&gt;&lt;TD align="left" valign="middle" width="15%"&gt;.xls&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="6" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD align="left" valign="middle" width="20%"&gt;EXCELCS&lt;/TD&gt;&lt;TD align="left" valign="middle" width="63%"&gt;Excel spreadsheet connecting remotely &lt;BR /&gt;through PC FIles Server&lt;/TD&gt;&lt;TD align="left" valign="middle" width="15%"&gt;.xls &lt;BR /&gt;&lt;P&gt;.xlsb&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options for the DBMS=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So anyway, I haven't had any similar scenario to relate to but if you have no constraints for the excel sheets to be saved in excel 2007 format, you could possibly use the DBMS=XLS. I suppose that something similar is used in the back scenes when you use proc export dbms=excel2007 running on W64. There may even be a warning or a note in the log stating that an engine different than EXCEL or EXCEL2007 was used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to delete old file/create new file if the existing file format is saved as excel2007 instead of 1997-2003 for DBMS=XLS to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 14:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89583#M25551</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-07-26T14:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89584#M25552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think &lt;A __default_attr="809401" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; is on to something with the sheet specifications. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found that I need to drop/delete the old information before I can rewrite over it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 14:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89584#M25552</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-26T14:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89585#M25553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think, all you need for you code to work is to use REPLACE option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dbms=excel replace;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 16:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89585#M25553</guid>
      <dc:creator>Marina</dc:creator>
      <dc:date>2013-07-26T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89586#M25554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He is using the REPLACE option.&lt;/P&gt;&lt;P&gt;I think one way to work around this issue would be to first delete the current excel file, then re-create it.&lt;/P&gt;&lt;P&gt;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89586#M25554</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-07-26T17:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89587#M25555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked fine for me, all the data was exported fine to the same excel file in each export. Only 3 not 4 iterations but it works. Try chainging the DBMS to Excel as Marina suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=sashelp.class outfile="C:\temp\class.xlsx"&lt;/P&gt;&lt;P&gt;dbms=excel replace;&lt;/P&gt;&lt;P&gt;sheet="Sample1";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; age=age*2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=class outfile="C:\temp\class.xlsx"&lt;/P&gt;&lt;P&gt;dbms=excel replace;&lt;/P&gt;&lt;P&gt;sheet="Sample1";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=class2 outfile="C:\temp\class.xlsx"&lt;/P&gt;&lt;P&gt;dbms=excel replace;&lt;/P&gt;&lt;P&gt;sheet="Sample1";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89587#M25555</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-26T17:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89588#M25556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems also inefficient, why isn't only the final processed data exported to excel, why all the back and forth?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89588#M25556</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-26T17:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89589#M25557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was your test on a 32-bits OS or 64-bits?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had no problem doing it either here at work but we're on Win32 and the proc export procedure documentation, as by the few bits that I've pasted above, don't support DBMS=EXCEL (or excel2007 for that matter) on a 64 bit OS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89589#M25557</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-07-26T17:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89590#M25558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested on Windows xp 32bit/SAS 9.2 32 bit/Excel 2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My home system is Excel 2007- Windows 7 64 bit though, so I'll test it tonight if it isn't resolved before then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 19:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89590#M25558</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-07-26T19:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: more than one proc export statements in one program</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89591#M25559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you limited to only using proc export?&amp;nbsp; You could use the PC File Server Libname in the following.&amp;nbsp; Unfortunately this method does not allow you to replace an existing table, so you need to perform a delete before each export.&amp;nbsp; I am running Win7 64-bit with a 32-bit MS Excel installation and it works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME XLSFILE PCFILES TYPE=EXCEL PORT=8621 SERVER=LOCALHOST SSPI=NO&amp;nbsp; TYPE = EXCEL VERSION = 2007 PATH = "E:\CLASS.XLSX" MSENGINE = ACE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS CLASS2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGE=AGE*2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC DATASETS LIBRARY = XLSFILE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DELETE "CLASS$"N CLASS;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA XLSFILE.CLASS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET SASHELP.CLASS CLASS2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME XLSFILE CLEAR;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 23:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/more-than-one-proc-export-statements-in-one-program/m-p/89591#M25559</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-07-26T23:22:26Z</dc:date>
    </item>
  </channel>
</rss>

