Problem Note 48573: The XLSX engine ignores the FILENAME statement
The FILENAME statement is ignored when using the XLSX engine to export or import Excel files. The following is an example:
filename fred 'c:\sastest\myfile19.xlsx';
proc export data=sashelp.class outfile=fred dbms=xlsx replace;
run;
You then receive this message:
NOTE: The export data set has 19 observations and 5 variables.
NOTE: "FRED" file was successfully created.
But the driver actually creates a file named FRED.XLSX rather than the actual filename itself. The file is created in the SAS current working directory.
When you are using the IMPORT procedure, you receive a message similar to the one below:
proc import out=myclass datafile=fred dbms=xlsx replace;
run;
ERROR: XLSX file does not exist -> .\FRED.xlsx
To circumvent the problem, put the full path in the OUTFILE= parameter, including the name of the Excel file.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.3 TS1M1 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M1 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M1 | |
| Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M1 | |
| Microsoft Windows Server 2003 for x64 | 9.3 TS1M1 | |
| Microsoft Windows Server 2008 | 9.3 TS1M1 | |
| Microsoft Windows Server 2008 for x64 | 9.3 TS1M1 | |
| Microsoft Windows XP Professional | 9.3 TS1M1 | |
| Windows 7 Enterprise 32 bit | 9.3 TS1M1 | |
| Windows 7 Enterprise x64 | 9.3 TS1M1 | |
| Windows 7 Home Premium 32 bit | 9.3 TS1M1 | |
| Windows 7 Home Premium x64 | 9.3 TS1M1 | |
| Windows 7 Professional 32 bit | 9.3 TS1M1 | |
| Windows 7 Professional x64 | 9.3 TS1M1 | |
| Windows 7 Ultimate 32 bit | 9.3 TS1M1 | |
| Windows 7 Ultimate x64 | 9.3 TS1M1 | |
| Windows Vista | 9.3 TS1M1 | |
| Windows Vista for x64 | 9.3 TS1M1 | |
| 64-bit Enabled AIX | 9.3 TS1M1 | |
| 64-bit Enabled HP-UX | 9.3 TS1M1 | |
| 64-bit Enabled Solaris | 9.3 TS1M1 | |
| HP-UX IPF | 9.3 TS1M1 | |
| Linux | 9.3 TS1M1 | |
| Linux for x64 | 9.3 TS1M1 | |
| Solaris for x64 | 9.3 TS1M1 | |
*
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 XLSX engine ignores the FILENAME statement. Even though the Excel file is created, the name of the Excel file is actually the name of the FILEREF and is placed in the current working directory.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2013-03-11 17:10:08 |
| Date Created: | 2012-11-30 09:50:16 |