How to Fix Errors When Importing Excel Files with Macros into Access
Question details
The user is unable to import or link an Excel file containing macros into Microsoft Access, encountering an error that the wizard cannot access information or the file format is incorrect.

- Product
- Microsoft Access and Excel
- Device & OS
- not provided
- Scenario
- Importing an Excel workbook (.xlsm) into an Access database using the External Data wizard.
- Observed behavior
- Access displays an error message stating that the file format is incorrect or the wizard cannot access the information in the file.
Ensure that the Excel workbook you are trying to import is completely closed, as having it open in Excel can block Access from reading the data.
Remove Special Characters from the Excel File Name
Special characters, such as underscores, in the file name can sometimes cause the Access import wizard to fail. Renaming the file often resolves the issue.
In some versions of Microsoft Access, the import wizard struggles to read paths or file names that contain specific special characters, including underscores (_). Removing these characters allows the wizard to process the file correctly.
Make sure the Excel file is completely closed in Microsoft Excel to avoid file lock issues.
Navigate to the folder containing your Excel file, right-click it, and select Rename. Remove any underscores or special symbols from the file name.
Open Microsoft Access and try importing the file again through New Data Source > From File > Excel.

Save as a Standard Workbook and Import Data Only
Access does not support importing Excel macros. Saving the data as a standard workbook ensures maximum compatibility.
Manage Your Spreadsheet Data with WPS Office
While Microsoft Access is used for relational databases, many advanced data management and automation tasks can be handled efficiently in a powerful spreadsheet tool. WPS Office offers a lightweight, free alternative to Microsoft Office with full support for macro-enabled workbooks and seamless data processing.

Frequently Asked Questions
Can I run Excel VBA macros inside Microsoft Access?
No, Microsoft Access cannot execute or directly import Excel VBA macros. You must import the raw worksheet data and then recreate the required automation using Access VBA or Access macros.
Why does Access say the Excel file format is incorrect during import?
This error typically occurs if the Excel file is currently open in another program, is corrupted, contains unsupported special characters in its file name, or uses an outdated file extension. Closing the file and renaming it usually resolves the issue.
Does the presence of macros prevent data from being imported into Access?
Normally, the presence of macros (.xlsm format) does not affect importing or linking data into Access, as long as the file is closed and not corrupted. The wizard will simply ignore the macros and extract the worksheet data.




