How to Preserve Colons in MS Access Column Headers When Exporting
Question details
The user needs to maintain colons in column headers when exporting query results from Microsoft Access to Excel, preventing the export process from altering them and causing system rejections.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Exporting Access query results to an Excel spreadsheet for another system to process.
- Observed behavior
- Column aliases containing colons are altered during the export to Excel, resulting in formatted files that are rejected by the receiving system.
Ensure you have full access to modify the query design in your Microsoft Access database and administrative rights to run VBA macros in Excel if required.
Use Bracketed Aliases in Access Query Design
Wrap your column aliases in square brackets within the Access query to explicitly define the header name before exporting.
Microsoft Access often modifies special characters during export to maintain compatibility. By using brackets, you can force the query to recognize the exact alias string.
Open MS Access, right-click your target query in the navigation pane, and select 'Design View'.
In the Field row of the query grid, type the desired header name enclosed in brackets, followed by a colon and the actual field name (e.g., [Run Time: MM]: [OriginalField]).
Save the query. If possible, export the query results directly into a pre-formatted Excel template that already contains the correct column headers.
Open the exported file in Excel and check the first row to ensure the colons were successfully preserved.

Format Excel Column Headers Using VBA After Export
If Access continues to alter headers during the export process, use an Excel VBA macro to instantly overwrite the headers with the exact required names.
Edit Your Exported Data Easily with WPS Office
While Microsoft Access handles your database queries, you can rely on WPS Office as a free, lightweight, and fully compatible alternative to Microsoft Excel for reviewing, correcting, and formatting your exported data.
- 1. Install WPS Office: Download and install the free WPS Office suite from the official website.
- 2. Open Your Exported Data: Launch WPS Spreadsheet and open the file you exported from MS Access.
- 3. Edit Headers with Colons: Click on the column header cells, type your desired names including colons, and save the document.

Frequently Asked Questions
Why does Access remove or change special characters like colons during export?
Microsoft Access often strips or replaces special characters in column headers during export to maintain strict compatibility with standard file formats and prevent syntax errors in spreadsheet applications.
Can I use an Excel template to enforce column headers with colons?
Yes, you can set up an Excel template with predefined column headers containing colons. When exporting from Access, choose to append the data to this existing file rather than overwriting the headers.
Are colons allowed in standard CSV headers?
Yes, CSV is a plain text format, so colons are perfectly valid in its headers. However, the program generating the CSV (like MS Access) might still restrict them based on its own internal field naming rules.




