BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
1 REPLY 1
ChrisNZ
Tourmaline | Level 20
Try using a stylesheet name without the $ sign to export.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 1209 views
  • 0 likes
  • 2 in conversation