Data Import & Export

How to Update a Saved Excel Import Specification in Access 2016

Muhammad TalhaMuhammad Talha Nov 22, 2026 868 views

Question details

The user needs to update an existing saved Excel import specification in Access 2016.

How to Update a Saved Excel Import Specification in Access 2016
Product
Microsoft Access 2016
Device & OS
not provided
Scenario
A saved Excel import needs different settings, but Access 2016 does not provide an easy interface for editing its specification.
Observed behavior
The user wants to inspect and change the saved import settings without relying on an editing interface.
Before you start

Open the database containing the saved import and identify the Excel import you want to change. If Access blocks VBA, enable content only if you trust the database and its source.

Solution 1Recommended

Update the saved import specification XML with VBA

Use this method when you need to change an existing saved specification rather than create a new one.

Access stores saved import and export specifications in CurrentProject.ImportExportSpecifications. Inspect the specification's XML before changing it; the exact settings and XML structure depend on the saved import.

1
Open the VBA editor

In the Access database, press Alt+F11, then choose Insert > Module.

2
List specifications and inspect their XML

Paste this procedure into the module, place the cursor inside it, and press F5. Open the Immediate window with Ctrl+G to review the names and XML: Sub ListSavedImports() Dim spec As Access.ImportExportSpecification For Each spec In CurrentProject.ImportExportSpecifications Debug.Print spec.Name Debug.Print spec.XML Next spec End Sub

3
Change the intended XML fragment

Paste the procedure below into the module. Replace SPEC_NAME with the exact name shown in the Immediate window, and replace OLD_TEXT and NEW_TEXT with the exact existing and revised XML fragments. Keep the XML valid, including any required escaping. Place the cursor inside the procedure and press F5. Sub UpdateSavedImport() Const SPEC_NAME As String = "Your saved import name" Const OLD_TEXT As String = "exact existing XML fragment" Const NEW_TEXT As String = "replacement XML fragment" Dim spec As Access.ImportExportSpecification Dim xmlText As String Dim pos As Long Set spec = CurrentProject.ImportExportSpecifications(SPEC_NAME) xmlText = spec.XML pos = InStr(1, xmlText, OLD_TEXT, vbBinaryCompare) If pos = 0 Then MsgBox "The existing XML fragment was not found." Exit Sub End If If InStr(pos + Len(OLD_TEXT), xmlText, OLD_TEXT, vbBinaryCompare) > 0 Then MsgBox "The XML fragment occurs more than once; use a more specific fragment." Exit Sub End If spec.XML = Replace(xmlText, OLD_TEXT, NEW_TEXT, 1, 1, vbBinaryCompare) MsgBox "The saved specification was updated." End Sub

4
Review and test the import

Run ListSavedImports again and check the revised XML in the Immediate window. Then use External Data > Saved Imports to run the specification and verify that the imported data and settings are correct.

Update the saved import specification XML with VBA
Use the XML from your own specification: Do not guess element or attribute names. An invalid or unsupported change may be rejected or may prevent the import from running as intended.
Free Microsoft Office alternative

Prepare Excel Workbooks with WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and support for Microsoft Office formats, making it easy to work with existing files. Use WPS Spreadsheets to review Excel source data before importing it into Access; it does not edit Access import specifications.

Review and organize Excel source data before an Access importOpen and edit Microsoft Excel XLS and XLSX workbooksUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Where can I find the names of saved import specifications?

In Access, open External Data > Saved Imports to view saved imports. You can also list names and XML in the VBA Immediate window using CurrentProject.ImportExportSpecifications.

Can I edit a saved Excel import specification through the Access 2016 interface?

Access 2016 does not provide an easy interface for editing an existing Excel specification. You can update its XML through VBA or create new saved import steps with the Excel import wizard.

What should I do if my XML replacement appears more than once?

Inspect the XML in the VBA Immediate window and use a longer, unique fragment for OLD_TEXT. The sample procedure stops without changing the specification if the fragment occurs more than once.

Will a new saved import automatically replace the old one in my VBA code?

No. If you save the new import under a different name, update any VBA or other automation that refers to the old specification name.

Can WPS Office update an Access import specification?

No. Update the specification in Microsoft Access using VBA or recreate the saved import. WPS Spreadsheets can help you review the source XLS or XLSX workbook.