Usage Note 52655: Microsoft Excel does not open XLSX files that were created with the EXPORT procedure
When opening a new Excel XLSX file that was created using PROC EXPORT, you might receive the following message:
Excel cannot open the file 'myfile.xlsx' because the file format or the file extension is not valid.
Verify that the file has not been corrupted or that the file extension matches the format of the file.
The problem occurs when you create new files with the SAS/ACCESS® Interface to PC Files using the PC Files Server and using code similar to this:
proc export data=sashelp.class
outfile='c:\my documents\myfile.xlsx'
dbms=ExcelCS replace; sheet='class'; run;
You must give the file an .xlsb extension in the PROC EXPORT code in order to open properly in Excel.
To circumvent this problem, do one of the following:
- Rename the .xlsb file that was created and use a .xlsx extension. For example, rename myfile.xlsb to myfile.xlsx.
- Manually create a new .xlsx file with Excel and then export your SAS® data to the existing .xlsx file.
- Use DBMS=XLSX in the PROC EXPORT code to create a new .xlsx file.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | 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 | |
| Microsoft® Windows® for x64 | 9.2 TS2M0 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 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.
An error occurs when you open a new Excel XLSX file that was created with SAS/ACCESS® Interface to PC Files.
| Date Modified: | 2014-05-08 15:52:31 |
| Date Created: | 2014-03-27 14:17:13 |