Forum Discussion

HKiSAP's avatar
HKiSAP
Copper Contributor
Jan 13, 2022

Missing log files when opening a corrupted Excel file

Dear Community,

 

in SAP (ABAP) I generate XML Calculation tables using xsl transformations. For debugging/testing purpose the logging functions in older Excel versions were quite helpful. When an error occured a log file has been created in a folder Content.MSO somewhere in C:\Users\....\AppData. With the current version I only see a popup window saying the file can't be loaded. How can I re-enable the log files, or how can I get more details on what is wrong with the file?

 

Thanks and kind regards,
HKiSAP

2 Replies

  • HKiSAP's avatar
    HKiSAP
    Copper Contributor

    Dear community,

    as some of you read my question but nobody had an idea on how to solve the problem, I tried myself. The idea was that one might get more information when trying to open the file via a VBA script. So I recorded a little script, added the ReadOnly parameter as well as the xlRepairFile option, then I got the good old log file back. The funny thing is, that I now also get the popup, when I open the corrupted file directly, i.e. via "open with" in the file's context menu. So if you ever run into the same issue, just keep trying and don't give up too early 😉

     

    Kind regards,
    H.

     

     

    • HKiSAP's avatar
      HKiSAP
      Copper Contributor
      Dear Community,

      just a little update: The xml file was saved from an e-mail. When I tried opening the file in Excel, I just got a popup window saying the file is corrupt. After opening the file in notepad and saving it with a new file name with UTF-8 encoding, as before, the information in the popup is pointing to the log file. There's no difference between the original file and the one saved from notepad, it has exactly the same number of bytes, i.e. no BOM has been added.

      Kind regards,
      H.

Resources