Corrupted Table Records

Issue #1196 resolved
Jonathan Ma
created an issue

When loading and saving a xlsm file with named tables, Excel complains about the file being corrupted. What gets fixed is the xl/tables/table##.xml file.

It seems like the files are missing the header string "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"

Comments (13)

  1. CharlieC

    Thanks for the updated file. Can sort of limit the issue to the sheet AssetProduct_Info but not really sure what Excel doesn't like. The OOXML is valid.

    It might be an idea to submit the file to Microsoft for some further information. Someone else did this recently for another issue and we got some useful information fairly quickly.

  2. Jonathan Ma reporter

    I removed the table and recreated it, which is good enough on my end, if you would like to ask MS that's fine with me, but I won't bug you more about this issue

  3. CharlieC

    Glad, you've found a workaround because I must admit I've no idea what the problem is. In #1180 someone was able to get some useful information from MS about what Excel is internally looking for and I think that's the only way to proceed with this. Copying the the table to a new workbook solves the problem even the though the table is the same.

  4. CharlieC

    The problem is related to the trailing whitespace at the end of the column name "Subsiduary Company / Subsiduary Unit ". Excel flags this in the sharedStrings.xml file with the xml:space="preserve" attribute but this is not documented when using inline strings (both approaches are supposed to be equivalent). Even then the rule for whitespace is that more than one instance will be ignored unless otherwise indicated.

    The best solution is probably simply to strip any trailing whitespace from column names.

  5. Log in to comment