Solved: Spreadsheet open error: Format error discovered in the file in sub-document styles.xml at 0,0(row,col), where is 0,0?

I have a spreadsheet that I worked on over the course of a couple of weeks. When I tried to open it today, I got the above error. I found answers to this type of problem involved zipping a copy of the file, then extracting the offending “styles.xml” and going to the location noted to see what was wrong. I did that, and using Notepad ++ I cannot see a row 0 or column 0. The lowest place I can go is 1,1.

I did open a known good ods file using the Notepad program and can’t see any difference at the beginning of them.

I cannot find a backup for the file either, so I have tried that route. Thanks for any help.

using Notepad ++ I cannot see a row 0 or column 0. The lowest place I can go is 1,1.

It’s just the different counting base. Notepad++ shows first line as “line 1”, while LO counts lines internally starting from 0. Same for character positions.

The “at 0,0(row,col)” only means that LibreOffice has found a problem in a chunk starting from position 0,0. The specifics of error reporting in XML parser in LO is that LO doesn’t know exact location, and can only tell starting position of current chunk (reading chunks of 64KiB data, IIRC). So the problem is likely in first 65535 bytes of the XML stream.

Thank you for the reply. I have posted a workable solution as an answer.

Workable solution so long as content.xml is OK:
I found an online file repair site that corrects errors and gives you a free sample file with some of your data removed. A web search will give you some options, I’m not promoting any site(s). Only took a couple of minutes, and fixed the file open error. You’ll need a zip file program, such as 7-Zip.

Repair process using Windows (text was too long to post here, I have added the steps as comments below).

Repair process using Windows:

(1) Create two new folders where you can find them, such as Desktop/New Folder and Desktop/New Folder/Repair.

(2) Save repaired partial file as an editable ods file in the upper folder (New Folder in this case). You can use the default long name or something shorter.

(3) Change it to a zip extension.

(4) Using a zip extractor (I used 7-Zip), extract all files to this folder. These are your known good files, but lack some of your content. Info: In opening my zipped original corrupt file, 7-Zip noted additional errors that involved meta.xml and the thumbnail png file.

(5) Extract all corrupt files to the new sub-directory, in this case New Folder/Repair.

(6) Create a new hybrid archive using 7-Zip, using both the replacement good files (in my case these were styles.xml, meta.xml, and the thumbnail png) in place of the corrupted files, with the remainder of your corrupted files, such as content.xml. Save it as any name you like, it will have a zip extension.

(7) Change the extension to .ods and your file should open as it was with all of your data visible.

(8) Change the file name to your old file name, or use a new one. You can delete the working folders once you have saved the repaired file elsewhere.

text was too long to post here, I have added the steps as comments below

But you had the correct text there before you moved it to comments for unclear reason, making it unnecessarily hard to read… One difference between answers and comments is that the former are not limited in length, while the former are limited (currently to 1000 characters).

6a) Add the mimetype file as the very first file and make sure it is not compressed. (else file type recognition does not work).