How to Update a Saved Excel Import Specification in Access 2016
Question details
The user needs to update an existing 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.
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.
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.
In the Access database, press Alt+F11, then choose Insert > Module.
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
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
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.

Recreate the saved Excel import steps
Use the import wizard to create a new saved specification if editing XML is impractical.
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.

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.




