Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proc Export

Status
Not open for further replies.

JM3482

Technical User
Nov 7, 2003
17
US
What am i missing in the following statement if I am trying to export a SAS table in excel format and then replace it the next time the program is run. It keeps stopping the replace process.

PROC EXPORT DATA=OPR9100.discharged
OUTFILE="C:\Data\OPR9100\Discharged Stage Pended LOS.xls";
REPLACE;
run;
 
hi,
this works for me:

PROC EXPORT DATA= WORK.tablename
OUTFILE= "Path\filename.xls"
DBMS=EXCEL2000;
RUN;

If you add the "REPLACE" to the statement the existing file
will be automatically replaced; by omitting "REPLACE" a Yes/No
MessageBox will be displayed.

HTH
Kind regards
Karlo Mutschler



meistertools@gmx.net
 
Thanks. I have tried it both ways and I can't get it to replace the file. I will try again.
 
hi,

PROC EXPORT DATA= WORK.tablename
OUTFILE= "Path\filename.xls"
DBMS=EXCEL2000 REPLACE;
RUN;

HTH
Karlo

meistertools@gmx.net
 
note ---- in the solutions you have an extra ; on one line -- should make a difference
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top