[Solved] corrupt file on Libre Office

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
v_florina
Posts: 2
Joined: Tue Oct 31, 2017 5:50 pm

[Solved] corrupt file on Libre Office

Post 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!
Attachments
2 si 3 rezultate si activitati.docx
(126.35 KiB) Downloaded 525 times
Last edited by RoryOF on Tue Oct 31, 2017 9:46 pm, edited 1 time in total.
Reason: Added [Solved] and green tick [RoryOF, Moderator]
OpenOffice 3.1 on Windows Vista
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: corrupt file on Libre Office

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: corrupt file on Libre Office

Post 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.
Attachments
2 si 3 rezultate si activitati_repaired.docx
(122.48 KiB) Downloaded 967 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
v_florina
Posts: 2
Joined: Tue Oct 31, 2017 5:50 pm

Re: corrupt file on Libre Office

Post 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!
OpenOffice 3.1 on Windows Vista
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] corrupt file on Libre Office

Post 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.
Attachments
2 si 3 rezultate si activitati_JH.odt
(77.31 KiB) Downloaded 579 times
Last edited by John_Ha on Tue Oct 31, 2017 10:58 pm, edited 1 time in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] corrupt file on Libre Office

Post 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. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] corrupt file on Libre Office

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] corrupt file on Libre Office

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Zizi64
Volunteer
Posts: 11345
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved] corrupt file on Libre Office

Post 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".
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Duckss2211
Posts: 3
Joined: Tue Dec 05, 2017 5:01 am

Re: [Solved] corrupt file on Libre Office

Post 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 360 times
Any other thoughts?

Thanks.
Open Office 4.1.4 on SP4 running Windows 10
User avatar
robleyd
Moderator
Posts: 5036
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Solved] corrupt file on Libre Office

Post 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.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
Duckss2211
Posts: 3
Joined: Tue Dec 05, 2017 5:01 am

Re: [Solved] corrupt file on Libre Office

Post by Duckss2211 »

Thanks David, I'll get onto that.
Open Office 4.1.4 on SP4 running Windows 10
Post Reply