|Date: ||Wed, 28 Sep 2011 09:21:53 -0400|
|Reply-To: ||Yusuf Mohamedshah <zulsdad@GMAIL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Yusuf Mohamedshah <zulsdad@GMAIL.COM>|
|Subject: ||Help PROC Export (Second Try)|
|Content-Type: ||text/plain; charset=ISO-8859-1|
I am trying to export a SAS dataset to Excel using following code. This code
has worked perfectly before but now I am getting errors. Following is the
log of the run:
NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.2 (TS2M3)
Licensed to FEDERAL HIGHWAY ADMINISTRATION, Site 70021957.
NOTE: This session is executing on the W32_VSPRO platform.
NOTE: SAS initialization used:
real time 1.11 seconds
cpu time 0.73 seconds
NOTE: AUTOEXEC processing beginning; file is C:\Program
NOTE: Libref DATA was successfully assigned as follows:
Physical Name: HSIS
NOTE: AUTOEXEC processing completed.
1 libname ch 'd:\hsis\backup_data\charlotte\2008_2010';
NOTE: Libref CH was successfully assigned as follows:
Physical Name: d:\hsis\backup_data\charlotte\2008_2010
4 PROC EXPORT DATA= ch.accident
6 DBMS=EXCEL REPLACE;
NOTE: File "d:\hsis\backup_data\charlotte\2008_2010\chacc_08_10.xlsx" will
be created if the
export process succeeds.
ERROR: Error attempting to CREATE a DBMS table. ERROR: Execute: The
Microsoft Office Access
database engine could not find the object 'ACCIDENT'. Make sure the
object exists and
that you spell its name and the path name correctly..
WARNING: File deletion failed for _IMEX_.ACCIDENT.DATA.
ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.30 seconds
cpu time 0.20 seconds
9 proc contents data = ch.accident;
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
The message in the log says that Export cannot find object ACCIDENT and make
sure that object exits and path is correctly spelled.
Hence I did a PROC CONTENTS on ACCIDENT which ran perfectly indicating that
object ACCIDENT exists and the path is also correctly spelled because
LIBNAME Statement did not give any errors. I am at a loss as to why this
code is not working. Any help would be appreciated.