BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
liquidimports
Fluorite | Level 6

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;

1 ACCEPTED SOLUTION

Accepted Solutions
liquidimports
Fluorite | Level 6

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

3 REPLIES 3
SASKiwi
PROC Star

Does adding the REPLACE option help?

proc export
data=hdat.nonrevclaimsmaster  
outfile="\TEST.xlsx"
dbms=excel
replace;
SHEET="Claims";
run;
liquidimports
Fluorite | Level 6
Hi, Thank you for the reply.
Replace does not help. It just overwrites.
liquidimports
Fluorite | Level 6

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

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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