Usage Note 40190: "External table is not in the expected format" errors when reading Excel XLSX files into SAS
When attempting to read Excel files into SAS, you can encounter the following error:
ERROR: Connect: External table is not in the expected format.
ERROR: Error in the LIBNAME statement.
This can have several causes including the following:
- The file is not actually an XLS or XLSX file but is really a text file, XML, or HTML file with an XLS or XLSX extension on it.
- The file has a corrupt index structure leading to the worksheet.
To solve the problem do one of the following depending on the issue:
- Open the file in Excel and resave it.
- Copy the contents of the worksheet to a new workbook and then import the new workbook.
- The ACE drivers in Office 2010 can sometimes read the corrupted structure in the file when Office 2003 or Office 2007 cannot. If you have Office 2010 you can try to use those drivers.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | Microsoft® Windows® for x64 | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
| Microsoft Windows XP Professional | 9.2 TS2M0 | |
| Windows Vista | 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.
"External table not in expected format" errors can occur when attempting to read corrupted files or XML files with an XLS or XLSX extension into SAS.
| Type: | Usage Note |
| Priority: | |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> MS Excel
|
| Date Modified: | 2010-12-20 15:20:56 |
| Date Created: | 2010-07-02 10:20:55 |