Excel Error Codes

How to Fix Excel XML Error: Hexadecimal Value 0x01 Is Invalid

Huma Ashraf ChHuma Ashraf Ch Oct 15, 2026 868 views

Question details

The user is unable to open an XML workbook in Excel due to an invalid hexadecimal character error.

How to Fix Excel XML Error: Hexadecimal Value 0x01 Is Invalid
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).
Before you start

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.

Solution 1Recommended

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.

1
Create a backup

Right-click your corrupted XML file, select 'Copy', and then 'Paste' it in the same folder to create a safe backup copy.

2
Open with a text editor

Right-click the original XML file, select 'Open with', and choose 'Notepad' or another plain text editor like Notepad++.

3
Locate the error position

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).

4
Delete the invalid character

Identify the unusual or invisible control character at that position and delete it.

5
Save and test

Press Ctrl + S to save the changes in the text editor. Close the editor and try opening the XML file again in Excel.

Remove the Invalid Character Using a Text Editor
Identifying Control Characters: In basic text editors like Notepad, a control character like 0x01 often appears as a small square box or a blank space.
Free Microsoft Office alternative

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.

Highly compatible with Microsoft Excel file formats, including .xlsx, .xls, .xml, and .csv.Completely free to use with a lightweight installation that runs smoothly on older devices.Familiar user interface ensuring seamless migration with zero learning curve.Built-in advanced data tools to safely import and format complex data exports.
QA img-9

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.