Help using Base SAS procedures

Import and export to same file.

Reply
N/A
Posts: 0

Import and export to same file.

Hi,
I'm trying to Import an excel file process it and export to the same file. When I try doing this I get this following error. Can SAS handle this?


WARNING: File _IMEX_.'Sheet1$$'n.DATA does not exist.
WARNING: Table _IMEX_."Sheet1$$" has not been dropped.
ERROR: The MS Excel table Sheet1$ has been opened for OUTPUT. This table already exists, or there is
a name conflict with an existing object. This table will not be replaced. This engine does not
support the REPLACE option.
ERROR: Export unsuccessful. See SAS Log for details.

My code:
PROC IMPORT OUT= WORK.EXTRACTMASTER
DATAFILE= "V:\LifeMaster\2009-05TestNS\RawData\ExtractMaster.xls"
DBMS=EXCEL REPLACE;
SHEET="Sheet1$";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;

Proc export data = work.updated_excel
outfile = "V:\LifeMaster\2009-05TestNS\RawData\ExtractMaster.xls"
dbms = excel
replace;
SHEET="Sheet1$";
run;
PROC Star
Posts: 1,760

Re: Import and export to same file.

Posted in reply to deleted_user
Try using a stylesheet name without the $ sign to export.
Ask a Question
Discussion stats
  • 1 reply
  • 425 views
  • 0 likes
  • 2 in conversation