The file '...' could not be repaired and therefore cannot be opened

Hello,

I was writing my diploma thesis. I had to install Ubuntu 22.04 LTS in order to make use of some applications. When I started writing my diploma document I did it from Microsoft Office through Windows 10. Therefore, when I wanted to open and edit the document I was doing it via the disk where windows were installed and not from ubuntu. While I was writing the document today, my ubuntu disk was full and i couldnt save the file. So, I made some room and then pressed Save. The LibreOffice application froze and after about 5 mins I click the exit at the right corner. When I tried to open the document again it prompted " The file ‘…’ is corrupt and therefore cannot be opened. LibreOffice can try to repair the file. The corruption could be the result of document manipulation or of structural document damage due to data transmission. We recommend that you do not trust the content of the repaired document. Execution of macros is disabled for this document. Should LibreOffice repair the file?". I pressed yes and after that it says “The file ‘…’ could not be repaired and therefore cannot be opened.” I press yes and nothing happens. The file was 217 pages and when I tried to open it through windows and MicrosoftOfice it says I have to convert the document but it only shows boxes, dots etc. Does anyone have any idea how to repair it?

Thank you,
Vaggelis

unfortunately sort of FAQ …
try to unzip your file (.odt ?), check the xml integrity …
What is the file format used by LibreOffice? - Wiki

similar to : Error:SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: p line 2 and hyperlin

the file was .doc and not .odt

Don’t you have any backup files? If not, it will be hard to repair your doc file. If it had been a docx file you can expand it (in many or most cases) and get the content.xml which could give you the text (that is better than nothing to have); doc files can’t do that. I have no clue what to do.

it would be the best to have backup files…but yes, the document is .doc.
i was thinking maybe LibreOffice had any folder to keep any autosaved versions.

You could have activated this. But - it’s a default setting. (Checked on LO 24.2.5.2 on LinuxMint.)



.
EDIT
1st statement was wrong (“It’s no default setting.”)

if it’s not by default then i won’t find it.
thank you

I started in save mode and it was displayed as default. Sorry for my mistake, I edited my former comment.

oh, i will come back with an update as soon as i get back to pc. thank you very much!

but, the document was created in MicrosoftOffice. so maybe there isn’t this option.

No. From what you have explained, you were writing a doc file to an NTFS partition from Ubuntu and filled the available disk space in which the OS operates. All bets are off, when you do this. Who knows what actually got written to the file before you managed to shut down Ubuntu, it could’ve been any old rubbish.