logo
search
Data Import & Export

How to Fix Errors When Importing Excel Files with Macros into Access

Ayan MasoodAyan Masood Oct 16, 2026 869 views

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.

How to Fix Errors When Importing Excel Files with Macros into Access
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.
Before you start

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.

Solution 1Recommended

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.

1
Close the workbook

Make sure the Excel file is completely closed in Microsoft Excel to avoid file lock issues.

2
Rename the file

Navigate to the folder containing your Excel file, right-click it, and select Rename. Remove any underscores or special symbols from the file name.

3
Retry the import

Open Microsoft Access and try importing the file again through New Data Source > From File > Excel.

Remove Special Characters from the Excel File Name
Keep the File Extension: Ensure the renamed file still retains its original .xlsm or .xlsx extension after renaming.
Free Microsoft Office alternative

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.

Free and lightweight office suiteFully compatible with Microsoft Excel formats (.xlsx, .xls, .xlsm)Familiar user interface for seamless migration without a learning curvePowerful data analysis and automation tools built-in
microsoft office alternative - wps office

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.