How to Fix Excel XML Error: Hexadecimal Value 0x01 Is Invalid
Question details
The user is unable to open an XML workbook in Excel due to an invalid hexadecimal character error.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Opening an XML workbook that contains exported or generated data.
- Observed behavior
- Excel fails to open the file and displays an error message stating that hexadecimal value 0x01 is an invalid character at a specific line and position (e.g., line 158, position 100).
Always create a backup copy of your XML file before making direct edits in a text editor to prevent accidental data loss or further file corruption.
Remove the Invalid Character Using a Text Editor
Manually edit the XML file to remove the unsupported control character at the specified line and position.
Hexadecimal value 0x01 is a non-printable ASCII control character that violates strict XML parsing rules. Removing it directly from the code will resolve the conflict.
Right-click your corrupted XML file, select 'Copy', and then 'Paste' it in the same folder to create a safe backup copy.
Right-click the original XML file, select 'Open with', and choose 'Notepad' or another plain text editor like Notepad++.
Use the text editor's 'Go To' function (often Ctrl + G) to navigate to the exact line mentioned in the error message (e.g., line 158). Then, look near the specified position (e.g., position 100).
Identify the unusual or invisible control character at that position and delete it.
Press Ctrl + S to save the changes in the text editor. Close the editor and try opening the XML file again in Excel.

Use the Open and Repair Feature in Excel
Utilize Excel's built-in repair tool to automatically fix formatting and character errors in the workbook.
Try WPS Office for Seamless Spreadsheet Management
If you frequently encounter file corruption, formatting issues, or frustrating error codes in Excel, consider switching to WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative for managing all your spreadsheets and XML files without the hassle.

Frequently Asked Questions
What does 'hexadecimal value 0x01 is an invalid character' mean?
This error means that the XML file contains a non-printable ASCII control character (specifically, 'Start of Heading') which is not allowed by standard XML parsing rules, causing the spreadsheet application to reject the file.
How can I easily find a specific line and position in Notepad?
In Notepad, ensure 'Word Wrap' is turned off under the 'Format' menu. Then, go to 'View' and enable 'Status Bar'. When you click around the text, the status bar at the bottom will display your current line and column (position) number.
Why do these invalid control characters appear in my XML files?
These characters are typically introduced when exporting data from legacy systems, databases, or third-party applications that fail to properly sanitize text fields before generating the XML document.
Will Excel's 'Open and Repair' tool delete my formulas?
If the corruption is severe, the repair tool may extract only the raw values and strip away specific formatting, conditional rules, or complex formulas. This is why you should always attempt the repair on a backup copy.




