Help using Base SAS procedures

PROC IMPORT & EXPORT

Reply
N/A
Posts: 0

PROC IMPORT & EXPORT

Hi,

I am reading an excel sheet using proc import and after i process my data I want to write my updated data to the same excel sheet.

But it doesnt do it. It writes to an another tab. here is the log code:

PROC IMPORT OUT= test.EXTRACTMASTER
14 DATAFILE= "V:\LifeMaster\2009-05TestNS\RawData\ExtractMaster.xls"
15 DBMS=EXCEL REPLACE;
16 SHEET="Sheet1$";
17 GETNAMES=YES;
18 MIXED=NO;
19 SCANTEXT=YES;
20 USEDATE=YES;
21 SCANTIME=YES;
22 RUN;

Proc export data = test.updated_excel
152 outfile = "V:\LifeMaster\2009-05TestNS\RawData\ExtractMaster.xls"
153 dbms = excel
154 REPLACE;
155 SHEET="Sheet1$";
156 run;

1 The SAS System 13:44 Monday, November 30, 2009

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
ERROR: The MS Excel table Sheet1$ has been opened for OUTPUT. This table already exists, or there is
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
a name conflict with an existing object. This table will not be replaced. This engine does not
a name conflict with an existing object. This table will not be replaced. This engine does not
support the REPLACE option.
support the REPLACE option.
support the REPLACE option.
ERROR: Export unsuccessful. See SAS Log for details.
ERROR: Export unsuccessful. See SAS Log for details.
ERROR: Export unsuccessful. See SAS Log for details.

wondering if there is fix to it.
Super Contributor
Super Contributor
Posts: 3,174

Re: PROC IMPORT & EXPORT

Posted in reply to deleted_user
Honestly, we're not seeing the entire SAS log - there is much missing which is likely contributing to your problem.

Suggest you turn on max diagnostics with the command below, then re-post with the entire log, not just snippets. And it may be worthwhile to do some additional desk-checking before re-posting - possibly you will see the problem cause:

OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC;

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 800 views
  • 0 likes
  • 2 in conversation