Page 1 of 1

[Solved] corrupt file on Libre Office

Posted: Tue Oct 31, 2017 5:53 pm
by v_florina
Hello,

I am desperately hoping there is somebody able to help me. I was working for few days on this file, saving it periodically, but this morning my laptop just restarted and the file I was working on is now corrupt. Somebody else tried to recover but I lost a lot of text from it. While opened in notepad, I can see the "lost text" is there and hoping I can recover all of it.
I am attaching it here, in the hope that somebody can help!

Thank you!

Re: corrupt file on Libre Office

Posted: Tue Oct 31, 2017 6:31 pm
by RoryOF
I've tried it and got nowhere - cascading errors throughout the file. Usually I walk away from such a file and try again after a few hours, often with greater success. I'll try again later tonight.

Re: corrupt file on Libre Office

Posted: Tue Oct 31, 2017 6:45 pm
by RoryOF
Try the attached file. Please check carefully to ensure no text has been deleted (I think none was) and that the formatting is as you require.

Re: corrupt file on Libre Office

Posted: Tue Oct 31, 2017 9:29 pm
by v_florina
Rory, thank you very much, I am grateful to you for this! You helped me a lot and saved a lot of hours of work and inspiration!

All the best for you!

Re: [Solved] corrupt file on Libre Office

Posted: Tue Oct 31, 2017 10:54 pm
by John_Ha
I downloaded your file and it opened with my AOO 4.1.4 without any problems!

I saved it as a .odt file as below.

I think the reason it opens OK in AOO is that AOO has better error detection and correction than LO. AOO just corrects the errors it finds. The first error is where w:cstheme is re-defined.

Re: [Solved] corrupt file on Libre Office

Posted: Tue Oct 31, 2017 10:57 pm
by RoryOF
I didn't try it with OO before trying it with XML Copy Editor. There seems to be a problem with LibreOffice's .docx filter - frequently a repeated pair of attributes in damaged files.
 Edit: John, your version only gives 44 pages and stops mid-sentence. My repaired version gives 86 pages and has much more text. I guess your version probably drops out at the first XML error, although if so, it is surprising that it loaded at all. 

Re: [Solved] corrupt file on Libre Office

Posted: Tue Oct 31, 2017 11:40 pm
by Villeroy
Under any circumstance save your work in the native file format of the application you are using.
Working with Microsoft Word you save your documents in docx format.
Working with Microsoft Excel you save your spreadsheet in xlsx format.
Working with Adobe Photoshop you save your pictures in psb format.
Working with Corel Draw you save your pictures in cdr format.
Working with Libre/OpenOffice you save your document in Open Document Format (ODF) with file name extensions odt for text, ods for spreadsheets, odp for presentations, odg for vector graphics.
Same with any editor for movies, sounds and what else. Every editor has its own specific editing format which covers all the capabilities of the application. The editing formats are tailored around the applications and vice versa.

For every media type there are several export formats for the readers, viewers, listeners of your work.
Web pages are published in HTML format.
Pictures are published in gif, jpg or png to mention just a few commonly used.
Sounds are published in mp3 format.
Movies are delivered in mp4, avi or some modern format that can be played by the commonly used movie players.
Printable documents (written text with pictures on print pages as created by Writer and Word) can be published in PDF format.

All the publishing file formats have one thing in common: They can be viewed and listened on everything that works like a computer. Every cell phone can view PDF files and every PDF looks exactly the same on every screen and gives the exact same results on every printer. Same with mp3 sounds, jpg pictures, mp4 movies. They simply work BUT these formats are not meant to be edited.

If some application supports many editing formats (like LibreOffice Writer supports Word's docx), this is for the only reason that you should be able to import these files and continue working with them.

Whenever you want someone else to read your textual work in LO Writer, you should use the universal export format for printable data which is the Portable Document Format (PDF). This gives readable and printable documents with a page layout true to your original that you created in your specific application.

Whenever you need to co-edit your document with another person having Microsoft Word installed on his PC, you have several options:
-- Convince him/her to install LibreOffice or OpenOffice in addition to MS Word. Nothing wrong with that.
-- Send your odt document. MS Word supports the international Open Document standard and should handle the file properly.
If MS Word or some other application does not handle your files correctly:
-- Make a copy in docx format, send that and keep your original odt for further editing.
-- Since LibreOffice and OpenOffice support the old doc format way better than the comparatively new (and awkward) docx format, you better send a doc copy. MS Word fully supports this document format anyway. So doc is the preferred exchange format when co-editing text documents with users of MS Word.

When the co-editor sends back his latest copy in doc(x) format, the first thing you do is to save your own working copy in the native format of LibreOffice (odt) and continue editing this copy until you send another doc(x) copy to the co-editor.
This way you always use the best document format with the best stability, performance and safety for your own work while having backup copies of your co-editing copies in foreign file format.

When you are working alone, without any co-editor, there is no reason to save in foreign file format anyway. BUT you absolutely need to take care that you make backup copies on a regular basis and independently from the software you are working with. You may use a backup software with an external storage (USB stick or hard drive). Others use cloud services (Drop Box). You may even send emails to yourself with the document attached so your mail provider keeps a backup copy.

A backup software copies everything you ever produced within a certain directory and since the time you performed the last run. If you run it daily, the maximum loss of work is no more than one day since you can replay yesterday's file copy from anything at any time.

Re: [Solved] corrupt file on Libre Office

Posted: Wed Nov 01, 2017 12:39 am
by John_Ha
See [Tutorial] Differences between Writer and MS Word files for why you should always work in and save files as .odt.

Rory

I think you must be correct. I have not investigated further.

Re: [Solved] corrupt file on Libre Office

Posted: Wed Nov 01, 2017 8:42 am
by Zizi64
Working with Microsoft Word you save your documents in docx format.
Working with Microsoft Excel you save your spreadsheet in xlsx format.
Set the MS Office to save into the "Strict" version of the OOXML Standard. The default setting of the MSO saving procedure is the "Transitional" version of the "standard".

Re: [Solved] corrupt file on Libre Office

Posted: Tue Dec 05, 2017 5:12 am
by Duckss2211
Greetings all. I am new to Open Office, and I have managed to corrupt 5 of my daughter school assignments that need to be submitted... um... now !
I have googled and googled, tried zip files but all to no avail :(
If I rename it as a zip or 7z file it won't open (says it's not an archive)
And of course we didn't have the auto backup turned on, so there are no backups...
I've attached one of them....
Russian Revolution.odt
(4.55 KiB) Downloaded 425 times
Any other thoughts?

Thanks.

Re: [Solved] corrupt file on Libre Office

Posted: Tue Dec 05, 2017 7:04 am
by robleyd
Your file seems corrupted beyond recovery.

As soon as possible do the following:

Download Recuva (Windows only) or PhotoRec for Win, MacOS, Linux and other OSes (only one needed) and let it do an in-depth recovery of deleted files on your computer. You may get a file containing some or all of your data (or not). Do this as a first priority; other use of the computer may overwrite any existing but deleted files and prevent their recovery. There is no guarantee that you will recover anything useful.

Also see [Tutorial] How to find and un-delete Writer temporary files for more detail.

Re: [Solved] corrupt file on Libre Office

Posted: Tue Dec 05, 2017 7:08 am
by Duckss2211
Thanks David, I'll get onto that.