Problem Note 33255: Dashes mistranslated to underscores when using the IMPORT and EXPORT procedures in sheetnames
Dash characters are mistranslated to underscores when using the SHEET= option with the IMPORT and EXPORT procedure. In this example:
proc export data = sashelp.class
dbms = excel
file = "j:\mydata\testout.xls"
replace;
sheet = 'AE-MHX';
run;
The sheet created in EXCEL is named AE_MHX instead of AE-MHX.
The IMPORT procedure works in a similar way. In this example the IMPORT procedure will attempt to import a sheet with a dash character.
proc import file = "j:\mydata\testout.xls"
dbms = excel
out = test
replace;
sheet = 'AE-MHX';
run;
However the IMPORT procedure will actually look for AE_MHX as the sheetname.
To circumvent the problem, avoid dashes in your sheetname when creating the Excel file and rename the dash character to an underscore character when importing the file.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | |
| Microsoft Windows NT Workstation | 9.1 TS1M3 | |
| Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | |
| Microsoft® Windows® for x64 | 9.1 TS1M3 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
| Microsoft Windows 2000 Server | 9.1 TS1M3 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | |
| Microsoft Windows XP Professional | 9.1 TS1M3 | |
| Windows Vista | 9.1 TS1M3 | |
*
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.
When using a dash in the sheetname with the IMPORT and EXPORT procedure the dash character is changed to an underscore in the Excel sheet.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2009-10-21 12:46:24 |
| Date Created: | 2008-09-10 17:38:27 |