/xl/sharedStrings.xml part with XML error. (Strings) Illegal xml character

You are exporting an excel sheet from the SAP system and you are getting below error when try to open it.

Solution

You may refer to the both SAP Notes,

  • 2616421 – How to determine and correct illegal XML character error?
  • 2517992 – WDA: Export to Excel creates a corrupt file
  1. Change the extension from .XLSX to .ZIP (do not decompress it!).
  2. Double click on the .ZIP file, and find the sharedStrings.xml file.
  3. Copy sharedStrings.xml to any location, but “out of” the .zip file (to your desktop for instance)
  4. Open the copied sharedStrings.xml file with an xml editor and find the characters which were discovered in the first part of the Resolution (“How to determine the illegal XML character”).
  5. Delete these corrupted characters, and save the file.
  6. Copy the sharedStrings.xml back to from where it was copied (it was in the .zip) – use copy & replace when windows asks, so basically overwrite the corrupted sharedStrings.xml with the changed/corrected sharedStrings.xml
  7. After finish, change the extension back to .XLSX.

NOTE: Copying the sharedString.xml file is necessary because the OS will not let the file get changed within the .zip, even if the read-only flag is removed.

Please note that the corresponding application team is responsible for the data itself.
In case further assistance is needed, involve the appropriate component.

You May Also Like

Leave a Reply?