Problem Note 13155: "Name conflict with existing object" error messages when exporting to
Excel sheets
When you use PROC export to export Excel to certain sheet names,
the following error can occur:
ERROR: The MS Excel table ab1 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.
The problem occurs when you attempt to replace an existing sheet as
shown in the example below:
proc export data=sashelp.class outfile='c:\testsas\testclss.xls'
replace
dbms=excel2000 replace;
sheet='ab1';
run; quit;
The problem occurs when the sheetname matches a cell address such
as AB1. The Microsoft Jet Engine cannot distinguish whether you want
to replace the cell contents or the sheet.
To resolve the problem use an _ to reference the sheet as follows:
proc export data=sasuser.baseball outfile='c:\testsas\testclss.xls'
replace
dbms=excel2000 replace;
sheet='_ab1';
run; quit;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft Windows NT Workstation | 9.1 TS1M2 | |
Microsoft Windows 2000 Server | 9.1 TS1M2 | |
Microsoft Windows XP Professional | 9.1 TS1M2 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M2 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M2 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M2 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M2 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M2 | |
Microsoft Windows 2000 Professional | 9.1 TS1M2 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2004-10-27 14:56:52 |
Date Created: | 2004-08-26 09:29:08 |