Usage Note 41060: The EXCELCS and PCFILES engines do not support the GETNAMES= and MIXED= options
The EXCELCS and PCFILES engines do not support the MIXED= and GETNAMES= options. However, the EXCEL engine does support these options.
The EXCEL engine calls the Microsoft Access Connectivity Engine directly so that it supports these options. The EXCELCS and PCFILES engines call the Excel ODBC driver, which then calls the Microsoft Access Connectivity Engine. However, the Excel ODBC driver does not support the two options.
To circumvent this issue, you can use one of the following methods:
The XLSX Method, for SAS® 9.3 and SAS® 9.4 only
- Save the Excel file as an .xlsx file.
- Move the file from the SAS® PC Files Server machine to the machine that is running SAS. If you use FTP to move the file, a binary transfer is required.
- Use PROC IMPORT with GETNAMES=NO as shown in the examples below.
If you are running in a Microsoft Windows x64 environment, submit the following procedure:
proc import datafile='c:\sastest\myfile3.xlsx'
out=sasdata
dbms=xlsx replace;
getnames=no;
sheet='test1';
run;
If you are running in a UNIX environment, you must use forward slashes in your path, as shown below:
proc import datafile='/my-unix-directory/myfile3.xlsx'
out=sasdata
dbms=xlsx replace;
getnames=no;
sheet='test1';
run;
The XLS Method, for SAS® 9.1.3 SP4 and later
- Save the Excel file as an .xls file.
- Move the file from the SAS PC Files Server machine to the machine that is running SAS. If you use FTP to move the file, a binary transfer is required.
- Use PROC IMPORT with GETNAMES=NO as shown in these examples below:
If you are running in a Microsoft Windows x64 environment, submit the following procedure:
proc import datafile='c:\sastest\myfile3.xls'
out=sasdata
dbms=xls replace;
getnames=no;
sheet='test1';
run;
If you are running in a UNIX environment, you must use forward slashes in your path, as shown below:
proc import datafile='/my-unix-directory/myfile3.xls'
out=sasdata
dbms=xls replace;
getnames=no;
sheet='test1';
run;
The EXCELCS Method, for SAS® 9.1.3 SP4 and later
This method can help with the GETNAMES= option, but not with the MIXED= option:
- Insert a blank row above the data that you want to read in Excel.
- Read the file using the RANGE= option, similar to the following example:
proc import datafile='c:\sastest\myfile2.xlsb'
out=sasdata
dbms=excelcs replace;
range='test1$a2:e21'n;
run;
The Tab-Delimited Text Method
- Save the Excel file as a tab-delimited .txt file.
- You must move the file from the SAS PC Files Server machine to the machine on which SAS runs. If you use FTP to move the file, an ASCII transfer is required.
- Use the IMPORT procedure with GETNAMES=NO and GUESSINGROWS=number-of-rows, as shown in the following examples:
If you are running in a Microsoft Windows x64 environment, submit the following procedure:
proc import datafile='c:\sastest\myfile3.txt'
out=sasdata4
dbms=tab replace;
getnames=no;
guessingrows=32767;
run;
If you are running in a UNIX environment, you must use forward slashes in your path, as shown in this example:
proc import datafile='/unix-directory/myfile3.txt'
out=sasdata4
dbms=tab replace;
getnames=no;
guessingrows=32767;
run;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | |
Windows Vista for x64 | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.2 TS2M0 | |
HP-UX IPF | 9.2 TS2M0 | |
Linux | 9.2 TS2M0 | |
Linux for x64 | 9.2 TS2M0 | |
Solaris for x64 | 9.2 TS2M0 | |
*
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.
The EXCELCS and PCFILES engines do not support the GETNAMES= and MIXED= options.
The EXCEL engine does support these options.
Date Modified: | 2010-10-28 15:48:35 |
Date Created: | 2010-09-28 15:07:04 |