Tablora · Library
Preserve text that looks like a SpreadsheetML escape
Text like _x0041_ is an escape code inside XLSX files. The text-safe converter protects it so the cell shows _x0041_ rather than the letter A.
A pattern the XLSX format reserves
Inside an XLSX file, text can contain codes of the form _x followed by four hexadecimal digits and an underscore, such as _x0041_. A spreadsheet reading the file decodes each code into the character it stands for, so _x0041_ becomes the capital letter A and _x000D_ becomes a carriage return. That is useful for software, but a problem when a real value happens to look like a code, for instance a system identifier, a field name from a database or a log token.
The text-safe converter protects every such pattern before writing it. It adds the escape for the underscore in front, which tells the spreadsheet to show the following characters literally. This is a separate step from escaping ampersands and angle brackets for XML.
Only the exact form is affected: an underscore, x, four hexadecimal characters and a closing underscore. Something like _x41_, or _x0041 without the closing underscore, is ordinary text in the file and in the spreadsheet.
The _x0041_ example
The page example has one column named code with the value _x0041_. The expected cell text in the workbook is _x0041_, written as explicit text, so the spreadsheet sees neither a formula nor a number there. When you open tablora-table.xlsx, the cell shows the seven characters you entered, not the letter A.
Checking escape-like values
- Search your source for an underscore followed by x and four characters from 0 to 9 and A to F, ending in another underscore. Upper and lower case hex digits are both treated as codes.
- Confirm that the value is meant literally. If the source itself contains encoded text, decode it in the system that produced it, not here.
- Paste the table, press Calculate and check the preview.
- Use Download (XLSX) and compare the cell in the spreadsheet with your original.
- Carriage returns inside a cell are protected the same way, so they also survive.
Escape patterns in other exports
- CSV downloads from the browser tools write _x0041_ as plain characters, because CSV has no such encoding; it is the spreadsheet's XLSX reading that applies it.
- The Tablora app's XLSX export escapes ampersands and brackets but does not add this protection, so a cell read from a page that contains _x0041_ may be shown decoded. For such values, export CSV from the app, or paste the cells into the text-safe converter here and download the XLSX.
- These patterns are rare in ordinary tables. If you find one, it usually comes from a technical system, and keeping the original file for comparison is worth the extra step.
Original synthetic example
- Input
- code _x0041_
- Expected cell text
- _x0041_
- Cell storage
- Explicit text, not a formula or numeric cell