<?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: proc export to excel not replacing sheet in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798409#M313872</link>
    <description>I misunderstood your question. Apologies. The version is&lt;BR /&gt;SYSVLONG=9.04.01M7P080520</description>
    <pubDate>Thu, 24 Feb 2022 16:19:20 GMT</pubDate>
    <dc:creator>GeorgeBonanza</dc:creator>
    <dc:date>2022-02-24T16:19:20Z</dc:date>
    <item>
      <title>proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798261#M313821</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the below code to export a sas dataset to an Excel worksheet. &amp;nbsp;If the workbook doesn't exist then it is created along with the sheet and everything works as intended. &amp;nbsp;However, if I change the work.HAVE dataset and re-run the export the SAS log tells me that "'WANT' range/sheet was successfully created" but the data in the sheet doesn't actually change and neither does the modified date on the Excel file. &amp;nbsp;I am working in SAS Enterprise Guide 7.15 and Excel 2016. &amp;nbsp;Any insight is greatly appreciated. &amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data= work.HAVE&lt;/P&gt;&lt;P&gt;outfile = "&amp;amp;path\test.xlsx"&lt;/P&gt;&lt;P&gt;dbms= EXCEL replace;&lt;/P&gt;&lt;P&gt;sheet= "WANT";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 21:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798261#M313821</guid>
      <dc:creator>GeorgeBonanza</dc:creator>
      <dc:date>2022-02-23T21:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798274#M313826</link>
      <description>&lt;P&gt;Suggest you try DBMS = XLSX since that is the actual workbook type.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 23:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798274#M313826</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-23T23:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798323#M313842</link>
      <description>&lt;P&gt;You use Enterprise Guide, so my first guess is that you are manipulating an Excel file on the SAS server, but looking at a file on your desktop.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 06:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798323#M313842</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-24T06:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798327#M313846</link>
      <description>&lt;P&gt;Which SAS version is in use? Are latest updates installed?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 07:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798327#M313846</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-02-24T07:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798370#M313861</link>
      <description>Yes, I am using EG but the job is running on the local machine.</description>
      <pubDate>Thu, 24 Feb 2022 12:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798370#M313861</guid>
      <dc:creator>GeorgeBonanza</dc:creator>
      <dc:date>2022-02-24T12:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798371#M313862</link>
      <description>I am using Enterprise Guide 7.1 and to the best of my knowledge updates are current.</description>
      <pubDate>Thu, 24 Feb 2022 12:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798371#M313862</guid>
      <dc:creator>GeorgeBonanza</dc:creator>
      <dc:date>2022-02-24T12:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798374#M313864</link>
      <description>&lt;P&gt;I asked which version of the sas-software is used: use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;=Sysvlong;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to write version number to the log.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 13:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798374#M313864</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-02-24T13:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798409#M313872</link>
      <description>I misunderstood your question. Apologies. The version is&lt;BR /&gt;SYSVLONG=9.04.01M7P080520</description>
      <pubDate>Thu, 24 Feb 2022 16:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798409#M313872</guid>
      <dc:creator>GeorgeBonanza</dc:creator>
      <dc:date>2022-02-24T16:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798514#M313928</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100491"&gt;@GeorgeBonanza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I misunderstood your question. Apologies. The version is&lt;BR /&gt;SYSVLONG=9.04.01M7P080520&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The latest release, so i don't think that the sas version is the culprit. The following steps work as intended:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data narf;
   set sashelp.class;
run;

proc export data=work.narf dbms=xlsx outfile="&amp;amp;Benutzer\data\narf.xlsx" replace;
   sheet= 'narf';
run;


data narf;
   set sashelp.class;
   Age = Age + 10;
run;

proc export data=work.narf dbms=xlsx outfile="&amp;amp;Benutzer\data\narf.xlsx" replace;
   sheet= 'narf';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So have you tried changing dbms to "xlsx" as recommended by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 06:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/798514#M313928</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-02-25T06:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/799142#M314207</link>
      <description>I tried running the code you shared and it does work as intended to create the file on the first export. However, after changing the age and rerunning the export step it does overwrite the existing "narf" sheet but it also creates another file called "narf.xlsx.bak". I tried exporting to both the desktop and shared folder on a LAN and got the same results. I haven't seen this before as it didn't happen using dbms = EXCEL</description>
      <pubDate>Mon, 28 Feb 2022 15:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/799142#M314207</guid>
      <dc:creator>GeorgeBonanza</dc:creator>
      <dc:date>2022-02-28T15:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc export to excel not replacing sheet</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/799167#M314219</link>
      <description>&lt;P&gt;Proc export does create a backup of existing xlsx workbook before over writing it. This is the normal behavior.&lt;BR /&gt;It does this both on Windows and Linux.&lt;BR /&gt;If you do not want this back this can be deleted or by running a macro to delete it. This forum post has the details&amp;nbsp;&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Removing-the-bak-with-proc-export/td-p/787216" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Removing-the-bak-with-proc-export/td-p/787216&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 16:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-to-excel-not-replacing-sheet/m-p/799167#M314219</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-02-28T16:32:52Z</dc:date>
    </item>
  </channel>
</rss>

