ACC: Cannot Import Spreadsheet If Field Name Begins with Space
Article ID: 161336
Article Last Modified on 1/19/2007
APPLIES TO
- Microsoft Access 95 Standard Edition
- Microsoft Access 97 Standard Edition
This article was previously published under Q161336
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you try to import a Microsoft Excel spreadsheet into a Microsoft
Access database, you may receive the following error message:
An error occurred trying to import file '<File Name>'. The file was not
imported.
CAUSE
The error occurs if there is a space preceding one or more of the field
names in the spreadsheet.
RESOLUTION
You can resolve the error in the following ways:
- Open the spreadsheet in Microsoft Excel and remove the leading space
from the field name.
- Link the spreadsheet in Microsoft Access instead of importing it.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0
and 97.
REFERENCES
For more information about importing data from Microsoft Excel into
Microsoft Access, search the Help Index for "Microsoft Excel, importing and
linking Excel data," or ask the Microsoft Access 97 Office Assistant.
Additional query words: worksheet attach
Keywords: kbbug kberrmsg kbinterop KB161336