1. Problem Overview: Export Project Texts Produces an Unreadable XLSX
Engineers localizing HMI projects in TIA Portal V13 SP1 use the Project texts > Export workflow to produce an Office Open XML spreadsheet (.xlsx) for translators. The export action completes without any error dialog in TIA Portal, but the resulting workbook cannot be opened by Microsoft Excel 2007 (and later versions up through current Excel 365 builds) because the package contains an illegal XML 1.0 control character. Excel reports a recoverable-content error, refuses to load the workbook, and strips large portions of the data. Siemens official documentation on exporting project texts confirms that the Export command always produces an OOXML container, but does not validate the resulting package against the spreadsheet consumer.
Symptom stack as reported by Excel 2007 on first open:
- Dialog title: "Excel found unreadable content in 'TIAProjectTexts.xlsx'. Do you want to recover the content of the workbook?"
- On recovery attempt: "Removed Part: /xl/sharedStrings.xml part with XML error. (Strings) Illegal xml character. Line 1, column 5600."
- On recovery attempt: "Removed Records: Cell information from /xl/worksheets/sheet1.xml part"
- On recovery attempt: "Removed Records: Cell information from /xl/worksheets/sheet2.xml part"
Third-party spreadsheet applications such as LibreOffice 5.0.2.2 open the same .xlsx package without complaint, but they silently drop the corrupt string table, which makes the localization export unusable because the English source-language column (the only column the translator needs as a reference) becomes empty.
2. Affected Versions, Updates, and Engineering Environments
The defect is reproducible in the following stack that engineers have confirmed in field reports. Treat any TIA Portal release prior to the listed fixed update as potentially affected.
| Component | Version / Model | Notes |
|---|---|---|
| TIA Portal (Step 7 / WinCC engineering) | V13 SP1 (base release through Update 8) | Defect still present in Update 8 per field reproduction |
| TIA Translation Tool | V1.1.4 / V1.1.5 | Cannot import the corrupt .xlsx; the Import dialog lists no files |
| WinCC Runtime Advanced | V13 SP1 (with matching Update) | Runtime compatibility is independent of the export defect |
| HMI panel (confirmed device) | SIMATIC KP900 Comfort | The HMI-screen text category is the trigger; TP/Comfort Panels of the same generation are likely affected by the same code path |
| Microsoft Excel | 2007 (and any later Excel that uses the strict XML parser) | Strict XML 1.0 compliance is enforced by the Open XML SDK |
| LibreOffice | 5.0.2.2 (and current builds) | Looser XML handling — opens the file but loses the source-language column |
The Siemens support entry 109311724 — TIA Portal V13 SP1 Update 5 download & release notes is the first public update step relevant to this export path, but the issue is not fully resolved there. The matching 109475709 — TIA Translation Tool entry is referenced as a workaround path. Newer TIA Portal major versions (V14, V15, V15.1, V16, V17, V18, V19, V20) re-implemented the export with stricter source-text validation, which is why the symptom is documented predominantly against V13 SP1.
3. Anatomy of an Office Open XML (.xlsx) Spreadsheet
An .xlsx file is a ZIP archive that follows the ECMA-376 / ISO/IEC 29500 Office Open XML SpreadsheetML conventions. The two parts involved in this defect are:
-
xl/sharedStrings.xml— the shared string table. Every distinct text value used by any cell is stored exactly once in this table, and cells reference the entries by integer index. This is the part that Excel flags as "(Strings) Illegal xml character." -
xl/worksheets/sheet1.xml,sheet2.xml, … — the per-sheet cell tables. Each cell is either a literal value, a number, a Boolean, a formula, or an index into the shared string table. When Excel removes the shared string table, the index references become orphan records and Excel strips them as Removed Records: Cell information from /xl/worksheets/sheet1.xml part.
Because the index references depend on the shared string table, a single bad entry cascades into thousands of stripped cell records on a large TIA export — which is why a single 4-character HMIscreen text can effectively wipe out the entire translation file.
4. Root Cause: Illegal XML 1.0 Control Character 0x1F in sharedStrings.xml
The XML 1.0 specification (W3C Recommendation, Fifth Edition) restricts the set of legal characters in well-formed documents to the following ranges:
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
Any byte below 0x20 other than TAB (0x09), LF (0x0A), and CR (0x0D) is illegal. The character that triggers the TIA Portal V13 SP1 defect is the ASCII Unit Separator (US):
| Property | Value |
|---|---|
| Code point (decimal) | 31 |
| Code point (hex) | 0x1F |
| Code point (octal) | 037 |
| Unicode name | INFORMATION SEPARATOR ONE (UNIT SEPARATOR) |
| Unicode general category | Cc (Control) |
| XML 1.0 status | ILLEGAL — not in Char production |
| XML 1.1 status | Legal only as a numeric character reference such as , but the rule is unchanged for raw text |
| Effect in Excel parser | Hard parse error; the entire sharedStrings.xml part is dropped, taking every string cell with it |
When the bad text contains the literal byte 0x1F, TIA Portal's V13 SP1 export writer serializes the value verbatim into the shared string table. The character is not escaped to a numeric character reference and is not filtered. Microsoft's Open XML SDK then refuses to parse the part because raw 0x1F is a non-character control code in XML 1.0.
sharedStrings.xml, which in turn is a strong indicator that the bad string is itself a control character and is the first byte of its <t>...</t> element.5. How the Character Enters the Project
The defect is concentrated in the HMI screen category of the project-text export. Reports consistently show that excluding the HMI-screen category yields a clean .xlsx, and that re-including it reproduces the corruption. The trigger is a single screen text — for example the on-screen label " Service " (with leading and trailing spaces) on a KP900 Comfort panel. The spaces themselves are legal; the illegal byte is typically introduced by:
- Pasting the text from a clipboard populated by a third-party SCADA / MES / spreadsheet tool that emits ASCII control characters as field delimiters.
- Importing a CSV / Unicode / ANSI text file that contains
0x1Fas a Unit Separator between logical fields. The TIA Portal V13 SP1 text import does not strip0x1F. - Programmatically writing into the HMI text database through a non-Siemens tool that does not validate against XML 1.0.
Text imported through a normal TIA Portal Project texts > Import action from a vendor-supplied translation file (.xlsx) can also carry the byte forward if the source .xlsx was originally produced by the same defective export. This is the most common propagation path: a translator is sent a corrupt file, opens it in LibreOffice, edits the strings, sends it back, and the next export re-emits the same byte.
6. Diagnostic Procedure: Isolating the Corrupting String
Before performing the archive surgery described in section 8, isolate the offending text so that the project database itself can be cleaned. If the database still contains the byte, every subsequent re-export will be corrupt again.
- In TIA Portal, open Project tree > Languages & Resources > Project texts.
- Click Export. In the Export project texts dialog, clear the checkbox for the HMI screen category only. Leave PLC text categories, alarm categories, and others selected. Click Export and open the resulting
.xlsxin Excel. - If the file opens cleanly, the HMI-screen category is confirmed as the carrier. Re-export, this time selecting only the HMI-screen category, to obtain a smaller
.xlsxthat contains only the suspect strings. - Open the smaller
.xlsxwith 7-Zip (see section 8) and extractxl/sharedStrings.xml. - Open
sharedStrings.xmlin a hex-capable editor (Notepad++ with the HEX-Editor plugin, HxD, or VS Code with the Hex Editor extension). Search for the byte sequence1Fwhile in hex view. Each occurrence corresponds to one project-text entry that contains the illegal character. - For each hit, return to TIA Portal, open the matching screen, and re-type the text. Do not paste from the clipboard — type each character. This replaces the underlying
0x1Fwith a normal space or with the literal text you intended. - Save the project, repeat the export, and verify the new
.xlsxopens in Excel without the recovery dialog.
7. Manual Recovery: 7-Zip XML Repair Procedure
Use the following procedure to repair an already-exported corrupt .xlsx. This is a stop-gap that recovers the data so the translator can begin work, but it does not fix the project database — combine it with section 6 for a complete remediation.
- Install 7-Zip on the engineering workstation.
- Right-click
TIAProjectTexts.xlsxin Windows Explorer and choose 7-Zip > Open archive. The file is opened as a ZIP container. - Navigate into the
xl/folder of the archive. - Drag
sharedStrings.xmlfrom the archive to a working folder. Do not close the archive yet. - Open the extracted
sharedStrings.xmlin a plain-text editor (Notepad++, VS Code, or Notepad). - Use the editor's Find function. In the Find what field, enable Regular expression mode and search for the literal text:
\x1F(if the editor uses C-style escapes) or the single byte0x1Fpasted in via a hex view. - Replace every match with an empty string. Save the file in UTF-8 (no BOM) encoding. Excel requires UTF-8 without a byte-order mark for the shared string table to be re-loaded correctly.
- Return to 7-Zip, navigate back to
xl/inside the archive, and Add the modifiedsharedStrings.xmlwith the same path. In 7-Zip's Add to archive dialog, accept the default compression and the original path. - Close 7-Zip. Double-click the repaired
.xlsxand confirm that Excel opens it without the recovery dialog and that the source-language column is intact.
sharedStrings.xml contains a UTF-8 BOM, Excel's Open XML parser will fail with a different error ("Excel cannot open the file because the file format or file extension is not valid"). Always save as plain UTF-8.8. The TIA Translation Tool Alternative Workflow
The TIA Translation Tool is the only Siemens-shipped utility designed to handle the import/export of localization data outside the TIA Portal main shell. The official entry point is:
- Siemens Support entry 109475709 — TIA Translation Tool description & download
Behavior of the Translation Tool in the affected versions:
-
Import dialog: when the source directory is selected, the file list area is empty. The tool refuses to enumerate any
.xlsxproduced by the V13 SP1 export, because the tool's internal schema validator returns a parse error on the corruptsharedStrings.xmlbefore the file is even presented to the user. -
Workaround for the tool: apply the section 7 repair to the
.xlsxfirst, then import the repaired file into the Translation Tool. The tool can then re-export the data in a format that a translator can consume. -
Direct in-tool use: open the project directly in the Translation Tool, perform the translation work in the tool's grid, and export the result as
.xlsx. The tool's exporter uses a different code path than the TIA Portal export and is not affected by the0x1Fbug in V13 SP1.
9. Software Update Path: TIA Portal V13 SP1 Updates
The defect is documented against V13 SP1 base and is reproducible after Update 8. The recommended path forward, in priority order, is:
- Migrate the project to a current TIA Portal version. The export code path was re-implemented in V14 and the string-table writer has additional validation in every release since. The Siemens documentation at TIA Portal V20 — Exporting project texts shows the modern workflow.
- Apply Update 5 (or later) of V13 SP1 and re-test. The Siemens support entry 109311724 provides the link, but field reports indicate the export defect is not fixed by Update 5, Update 6, Update 7, or Update 8. Treat the update as a prerequisite for the runtime and as an opportunity to re-test, not as a fix.
- Match the WinCC Runtime Advanced version to the TIA Portal engineering version. A V13 SP1 Update 5 or later runtime is required on the target system; otherwise the engineering project may not deploy cleanly even when the export defect is worked around.
Before upgrading, capture the project's text database (clean .xlsx produced via section 7 + section 6) so the localization work is not lost during the migration.
10. Preventive Workflow Practices for Multi-Language Projects
- Ban the byte in your localization SOP. Add an automated pre-import filter (PowerShell, Python) that strips every C0 control character (U+0000 to U+001F except TAB, LF, CR) from any text file before it is loaded into the TIA project.
- Sanitize clipboard pastes. When pasting multi-language strings into an HMI text field, paste first into Notepad (which normalizes line endings) and only then copy from Notepad into TIA Portal. This avoids Unit Separator and other field-delimiter bytes that clipboard providers may inject.
-
Validate every export by running a script that opens the produced
.xlsxwith the Open XML SDK and parsessharedStrings.xml. Reject any project-text export that contains bytes outside the XML 1.0 Char production. -
Source-language column round-trip. After every export, open the
.xlsxin Excel immediately. The English-US column must be populated; if it is blank, the file has been silently downgraded by a non-strict parser and must be regenerated. - Translate outside TIA Portal. Use the TIA Translation Tool (or a CAT tool that emits clean UTF-8) as the system of record for translations, and only round-trip into the TIA project database. This isolates the localization workflow from the TIA Portal export bug.
11. Verification: Confirming a Healthy Workbook
After any repair, perform the following checks to confirm that the .xlsx is well-formed and the translation data is complete.
- Excel open test. Double-click the file. The recovery dialog must not appear. If it appears, repeat the section 7 procedure on the new file.
- Sheet enumeration. In Excel, the bottom tab bar must show all of the expected sheets (one per export category). A missing sheet indicates that a part was dropped during parse.
-
Cell count. Compare the cell count of the repaired file (visible in Excel's Name Box after pressing
Ctrl+End) against the cell count of a known-good export from a clean project. A large drop indicates orphan index references. -
String-table integrity. Use 7-Zip to extract
xl/sharedStrings.xmland grep the file for the byte0x1F. Zero hits is the only acceptable result. -
Round-trip import. Re-import the repaired
.xlsxinto the TIA Portal project and confirm that the editing language column shows the expected translated strings. If the column is empty, the project database is still contaminated and you must apply the section 6 procedure.
12. Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
Excel recovery dialog with "Illegal xml character" on sharedStrings.xml
|
Raw 0x1F in an HMI-screen text |
Section 7 repair + section 6 source cleanup |
| Excel opens the file but the English-US column is empty | LibreOffice or non-strict parser dropped the corrupt string table | Re-export from TIA Portal, do not save in LibreOffice |
| TIA Translation Tool Import dialog shows no files | Internal schema validator rejects the corrupt .xlsx
|
Apply section 7 repair, then re-attempt import |
Repaired .xlsx still fails to open |
UTF-8 BOM was written into the saved sharedStrings.xml
|
Re-save without BOM |
| Defect reproduces after every re-export | Project text database still contains the illegal byte | Apply section 6 source-text cleanup |
| Defect persists after Update 5 / Update 6 / Update 7 / Update 8 of V13 SP1 | Defect is not fixed in any V13 SP1 update | Migrate to V14 or later, or keep using the section 7 repair |
| WinCC Runtime refuses to download the project | Engineering / runtime version mismatch | Update runtime to the same V13 SP1 Update level as engineering |
Frequently Asked Questions
What is the exact illegal byte that causes TIA Portal V13 SP1 export to fail?
The byte is 0x1F (ASCII Unit Separator, decimal 31). It is an XML 1.0 control character that falls outside the legal Char production, so the Open XML SDK in Excel refuses to parse xl/sharedStrings.xml and strips the entire string table.
Why does LibreOffice open the corrupt .xlsx but Excel does not?
LibreOffice 5.0.2.2 uses a more lenient XML parser that recovers from the illegal byte, but in doing so it drops the corrupt shared string table. The cells then lose their text values, which is why the English source-language column appears empty. Excel's Open XML parser is strict and surfaces the recovery dialog instead.
Does TIA Portal V13 SP1 Update 5, 6, 7, or 8 fix the defect?
No. Field reports confirm the defect is still present in V13 SP1 Update 8. Apply the manual 7-Zip repair (section 7) for the current project and plan a migration to TIA Portal V14 or later for a permanent fix.
Which project-text category is the trigger?
The HMI screen category. Exporting without the HMI-screen category yields a clean .xlsx. Once the HMI-screen category is re-enabled, the corruption returns if any screen text contains 0x1F.
How do I clean the project database so the defect does not re-appear on the next export?
Use 7-Zip to extract sharedStrings.xml from a single-category HMI export, search the file for the byte 0x1F in a hex editor, and for every match re-type the corresponding HMI text in TIA Portal by hand. Do not paste from the clipboard. Re-export and verify the new .xlsx opens in Excel without the recovery dialog.
Will the TIA Translation Tool accept the corrupt .xlsx?
No. The Translation Tool's schema validator rejects the file and the Import dialog shows an empty file list. Repair the .xlsx with the 7-Zip procedure first, or perform the translation inside the Translation Tool directly to bypass the TIA Portal exporter.
Is the same defect present in current TIA Portal versions such as V18, V19, or V20?
No. The export code path was re-implemented in V14 with stricter source-text validation. The defect is documented only against TIA Portal V13 SP1. The V20 documentation reflects the current, validated export workflow.