DATA Step, Macro, Functions and more

Proc export to update an existing excel sheet?

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Proc export to update an existing excel sheet?

Hi,

Im reaching out to this community for help with a small issue. I am trying to update an existing excel file (if it is somehow possible) but the data keeps replacing or overwriting. I want the Claims tab to keep updating when the sas is ran.  Any suggestions would be appreciated.

proc export

data=hdat.revclaimsmaster

outfile="\TEST.xlsx"

dbms=excel;

SHEET="Claims";

run;

proc export

data=hdat.nonrevclaimsmaster  

outfile="\TEST.xlsx"

dbms=excel;

SHEET="Claims";

run;


Accepted Solutions
Solution
‎04-25-2016 09:13 AM
New Contributor
Posts: 3

Re: Proc export to update an existing excel sheet?

Posted in reply to liquidimports

I was able to bypass it by adding &RUNDT to the filename. It creates an excel file with a current date in a title

 

View solution in original post


All Replies
Super User
Posts: 3,254

Re: Proc export to update an existing excel sheet?

Posted in reply to liquidimports

Does adding the REPLACE option help?

proc export
data=hdat.nonrevclaimsmaster  
outfile="\TEST.xlsx"
dbms=excel
replace;
SHEET="Claims";
run;
New Contributor
Posts: 3

Re: Proc export to update an existing excel sheet?

Hi, Thank you for the reply.
Replace does not help. It just overwrites.
Solution
‎04-25-2016 09:13 AM
New Contributor
Posts: 3

Re: Proc export to update an existing excel sheet?

Posted in reply to liquidimports

I was able to bypass it by adding &RUNDT to the filename. It creates an excel file with a current date in a title

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1369 views
  • 0 likes
  • 2 in conversation