How to Import XML Data Over 255 Characters into Access
Question details
The user needs to prevent Microsoft Access from truncating XML data that exceeds 255 characters during the import process.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Importing an XML file containing long text strings into an Access database table.
- Observed behavior
- Access imports the XML values as Short Text by default, cutting off any data longer than 255 characters, even if the XSD type is modified.
Ensure you have a recent backup of your Access database before modifying table schemas or running external VBA import scripts.
Use a Staging Table to Modify the Field Type
Import the XML data into a temporary table, change the truncated field to Long Text, and then re-import or append the data.
Because Access defaults to Short Text when interpreting XML imports, modifying the field type in a staging table allows you to bypass this limitation. Once the table structure is corrected, Access will respect the Long Text designation for subsequent imports.
Go to the External Data tab, select 'XML File', and import your data into a new table. Ignore the truncation for this initial step.
Right-click the newly created staging table and select 'Design View'. Find the field that was truncated, change its Data Type from 'Short Text' to 'Long Text', and save the table.
Delete the truncated records from the staging table. Run the XML import wizard again, but this time choose to append the records to your modified staging table. The data will now import without the 255-character limit.

Use the MSXML Library via VBA
Write a custom VBA script using the MSXML library to parse the XML document and insert the data with precise control.
Try WPS Office for Seamless Data Management
While Microsoft Access handles complex relational databases, managing daily datasets and extensive text is often easier in a robust spreadsheet environment. WPS Office provides a lightweight, highly compatible alternative for processing, analyzing, and formatting large datasets without truncation limits.
- 1. Install WPS Office: Download and install the free WPS Office suite from the official website.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet to handle your tabular data, XML files, and CSV exports effortlessly.
- 3. Import Data Easily: Use the built-in Data import tools to load your large datasets securely without worrying about default text truncation.

Frequently Asked Questions
Why does Access cut off my text at 255 characters?
Microsoft Access maps undefined or unconstrained text fields in imported files to the 'Short Text' data type by default. The Short Text data type has a hard architectural limit of 255 characters, causing any excess data to be dropped.
Can modifying the XSD file fix the Access truncation issue?
Changing the XSD numeric type from short to long is unreliable. The Access import wizard frequently ignores these specific schema constraints for text lengths, defaulting back to Short Text during the initial table creation.
What is the maximum length of a Long Text field?
A Long Text field (previously known as Memo) can store up to 63,999 characters when data is entered through the Access user interface, and up to 1 gigabyte of text when manipulated programmatically via VBA.
Is VBA slower than the native Access XML import?
Yes, parsing an XML file node-by-node using the MSXML library in VBA is generally slower than the built-in import wizard. However, it is necessary when you need absolute control over how data types are mapped and inserted.




