[Hint] How did I fix my ODT file

Discuss the word processor
User avatar
CannedMan
Posts: 250
Joined: Wed Aug 04, 2010 12:06 am

Re: [Hint] How did I fix my ODT file

Post by CannedMan »

cwolan wrote: Wed Jun 05, 2024 9:47 pm @CannedMan

Does this file resemble the original?
It does! The only thing that had changed was the formatting of the ToC (and its title having changed to Danish). How did you do it? What was wrong? I would be very keen to learn.
LibreOffice 7.6.7.2 (X86_64) on Windows 10.0 (19045)
cwolan
Posts: 164
Joined: Sun Feb 07, 2021 3:44 pm

Re: [Hint] How did I fix my ODT file

Post by cwolan »

CannedMan wrote: Sun Jun 09, 2024 1:56 am How did you do it? What was wrong? I would be very keen to learn.
Not to my surprise, I'd like to learn it too.

While browsing through the internal file content.xml, I spotted two entries in the table of contents section. Both seemed irregular in some way.
I removed the table of content and zipped the entire document. LO opened the .odt file smoothly.
CannedMan wrote: Sun Jun 09, 2024 1:56 am (...) The only thing that had changed was the formatting of the ToC
I created the ToC via Insert ⟶ Table of Contents and Index, hence the formating change.
CannedMan wrote: Sun Jun 09, 2024 1:56 am (and its title having changed to Danish).
My bad! I did that under the Danish UI. Should I have used the Norwegian one?

Coming back to "irregular" entries in content.xml (screenshot taken in Notepad++):
contentXML.png
contentXML.png (111.83 KiB) Viewed 12318 times

Consider the values marked in yellow i.e. "-1" and "0".
AFAICT the ODF specs version 1.3 [1, 2] state that text:outline-level attribute has the data type positiveInteger.
ODFspecs13.png
ODFspecs13.png (67.38 KiB) Viewed 12318 times


All in all (including my ignorance in terms of the XML coding system and ODF specs), I second the advice given by RoryOF:
RoryOF wrote: Mon Jun 03, 2024 3:20 pm (...)
I think if you posted a query on ask.libreoffice.org you might get some useful advice from the senior participants on that list..


----------------------------------
Refs.:
[1] 8.13.1 <text:index-entry-chapter>

[2] 19.850 text:outline-level
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 25.2
Windows 7,10,11 64-bit
User avatar
CannedMan
Posts: 250
Joined: Wed Aug 04, 2010 12:06 am

Re: [Hint] How did I fix my ODT file

Post by CannedMan »

cwolan wrote: Sun Jun 09, 2024 6:16 am
CannedMan wrote: Sun Jun 09, 2024 1:56 am How did you do it? What was wrong? I would be very keen to learn.
Not to my surprise, I'd like to learn it too.

While browsing through the internal file content.xml, I spotted two entries in the table of contents section. Both seemed irregular in some way.
I am very impressed! Could you elaborate on what exactly caught your attention? Or was it just a hunch perhaps?

XML is similar enough to HTML that I get the gist of what is going on, but at the same time it is so large that I quickly lose track of where I even was to begin with.

Danish: Not to worry, mate, I just notice the change and was curious as to how it happened: Now I know you recreated the ToC on your own, so now I know why it changed.

Can I just say you are awesome? And yes, I do believe getting familiar with ask.libreoffice.org is a good idea, so I made myself an account there. (I just love this forum; it’s been here whenever I have been stuck and needed help and still is one of my all-time favourite Internet places. It will be a sad day, indeed, when the veterans here pass away.)
LibreOffice 7.6.7.2 (X86_64) on Windows 10.0 (19045)
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

CannedMan wrote: Tue Jun 11, 2024 1:20 am
It will be a sad day, indeed, when the veterans here pass away.)
A famous English statesman once said in his final illness "Die!? My dear doctor, that's the last thing I shall do!"
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
User avatar
robleyd
Moderator
Posts: 5383
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Hint] How did I fix my ODT file

Post by robleyd »

Some sources also attribute the comment to Groucho Marx.

However, on present indications the veterans may outlast the forum.
Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 25.2.4.3; SlackBuild for 25.2.4 by Eric Hameleers
---------------------
Roses are Red, Violets are Blue]
Unexpected '{' on line 32
.
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

robleyd wrote: Tue Jun 11, 2024 9:34 am Some sources also attribute the comment to Groucho Marx.

However, on present indications the veterans may outlast the forum.
Viscount Palmerston (1784 - 1865)

But I bet Groucho would wish to have said it!
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

I couldn't unzip my corrupted ods file. Please can someone help me?
I have tried all most every methods & zip or calc repair tools but no success.
if anyone can check my file, please contact me in private message? my file is of 2.95 mb so can't attach it here.
Last edited by mahwish on Tue Dec 10, 2024 9:02 am, edited 1 time in total.
OpenOffice 4.1.3 on Windows 7
User avatar
floris v
Volunteer
Posts: 4565
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: [Hint] How did I fix my ODT file

Post by floris v »

mahwish wrote: Mon Dec 09, 2024 8:20 pm I couldn't unzip my corrupted ods file. Please can someone help me?
I have tried all most every methods & zip or calc repair tools but no success.
if anyone can check my file, please contact on rubabsheikh18@gmail.com? my file is of 2.95 mb so can't attach it here.
Hi and welcome. When your files are too big to upload as an attachment, you can upload them at a website like www.mediafire.com. Please don't use a website where people have to register to download something. Don't post your mail address here, that may attract spam bots that will then spam you for the rest of your life.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

mahwish wrote: Mon Dec 09, 2024 8:20 pm I couldn't unzip my corrupted ods file. Please can someone help me?
I have tried all most every methods & zip or calc repair tools but no success.
if anyone can check my file, please contact me in private message? my file is of 2.95 mb so can't attach it here.
here the file is https://upload.city/0APVmajq3Xo8/file
Please if someone can get its content either as text or a repaired file, or some tool that is giving the preview of the fixed content.
OpenOffice 4.1.3 on Windows 7
User avatar
floris v
Volunteer
Posts: 4565
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: [Hint] How did I fix my ODT file

Post by floris v »

@mahwish: I'm very sorry, opened the file in a hex editor and it's all zeroes. It's completely destroyed. See [Tutorial] The Dreaded Pound Signs: file reduced to ####. I wish you all the luck you need.
LibreOffice 24.2.7.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

Just as a general comment: it is best when trying to recover a damaged file, before doing anything else, to Save a copy (make this at operating system level), so that in the event your recovery attempts fail, this copy of the damaged file with no attempted recoveries is available for more expert attempts at recovery.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

floris v wrote: Wed Dec 11, 2024 3:03 pm @mahwish: I'm very sorry, opened the file in a hex editor and it's all zeroes. It's completely destroyed. See [Tutorial] The Dreaded Pound Signs: file reduced to ####. I wish you all the luck you need.
thanks for ur effort.
OpenOffice 4.1.3 on Windows 7
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

It is not the first time open office file gets corrupted in my case. sometimes i recovered it from temporary folder.
Secondly this OO files failure has been reported for past more than 10 years. It means OpenOffice will never fix this.

It will be more helpful to the people,(who want to use open source/license free office suite to avoid cracking MS office suite which is unethical) if by using this forum some alternative free office suite is suggested & alerting the users not to use OpenOffice suite until officially the bug gets fixed by OpenOffice.
OpenOffice 4.1.3 on Windows 7
User avatar
LastUnicorn
Posts: 763
Joined: Sat Mar 29, 2008 2:41 am
Location: Scotland

Re: [Hint] How did I fix my ODT file

Post by LastUnicorn »

Switch to LibreOffice to avoid this buggy OpenOffice behaviour. There are several good reasons for making the switch anyway, some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information
LibreOffice 25.2.3.2 (x64) installed to Windows 11 Pro. 24H2
Apache OpenOffice Portable 4.1.15 [Portable Apps]
For Java I use Adoptium Temurin JRE LTS Releases.
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

LastUnicorn wrote: Thu Dec 12, 2024 4:20 pm Switch to LibreOffice to avoid this buggy OpenOffice behaviour. There are several good reasons for making the switch anyway, some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information
Since LibreOffice is based on OpenOffice, I still have doubts & don't want to take risks. Please if possible, suggest some free office suite which have nothing to do with OpenOffice.
OpenOffice 4.1.3 on Windows 7
User avatar
robleyd
Moderator
Posts: 5383
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: [Hint] How did I fix my ODT file

Post by robleyd »

Google Docs, WPS Office, FreeOffice are some I found by searching the web for Free office suite
Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 25.2.4.3; SlackBuild for 25.2.4 by Eric Hameleers
---------------------
Roses are Red, Violets are Blue]
Unexpected '{' on line 32
.
User avatar
Hagar Delest
Moderator
Posts: 33344
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [Hint] How did I fix my ODT file

Post by Hagar Delest »

mahwish wrote: Thu Dec 12, 2024 4:28 pm Since LibreOffice is based on OpenOffice, I still have doubts & don't want to take risks. Please if possible, suggest some free office suite which have nothing to do with OpenOffice.
Actually, LibreOffice has paid for a revamp of the code related to the save process (in the very early stage of the fork). This one leading to ### has been fixed and therefore you can use LO safely. If it had not been the case, you would have plenty of similar topics in this very forum with LO too, which is not the case. And we would not be advising the switch to LO.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
User avatar
RoryOF
Moderator
Posts: 35055
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Hint] How did I fix my ODT file

Post by RoryOF »

I cannot answer for OpenOffice used under Windows, but I find it extremely stable under linux (Xubuntu in my case, but other distros tried at various times also). The important action is to close one's file, then close OpenOffice, and leave a few seconds for write buffers to flush to disk; don't just power down or snap a laptop lid shut with files open.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
BarbaravdW
Posts: 3
Joined: Sat Jan 11, 2025 8:27 am

Re: [Hint] How did I fix my ODT file

Post by BarbaravdW »

Goodmorning. Im currently in total meltdown mode because I was an idiot and deleted some files from my USB stick that were actually NOT copied onto my laptop. Ive recovered some files using Disk Drill, but now the .odt file acts odd in opening it. Writer asks for Ascii-filteroptions, I select the preselected 'west-europa' thingy, and the file opens into 200 pages of this

³î½<Ëû4×´XÂàåæÖ<;£Û.0GÚÏ8È?êë_áÉû)|^“ö}ý¨?g/�##Ýð[㯄¾+#UÞd_#kÖ#³&Ü�Á…¡R¹ä#w¯÷#ŠXçŠ9¡t–#£#Å$l#$V#V#¸ ƒšëúVdÑÂñV]žA[ë#e#ç*2ß×–¤W¢Dä•9¨N›èï÷ÿ#Ã#¢Š+ùXöŠ( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #Š( #«^ÞÙé¶wzŽ£wk§éú}¬—·÷÷· kge

I am very much a digital idiot and am completely clueless how to fix this. It should be about 25 pages of text, so I guess all the data is somehow still there (As it becomes 200+ pages of nonsense symbols). Can anyone please help me?
open office 4.1.15 on windows 11
FJCC
Moderator
Posts: 9539
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: [Hint] How did I fix my ODT file

Post by FJCC »

Your file is almost certainly corrupted beyond repair. You could post it here to see if anyone can recover anything. To upload a file, click post reply and look for the Attachments tab just below the box where you type a response. But you should assume that the file is gone.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
BarbaravdW
Posts: 3
Joined: Sat Jan 11, 2025 8:27 am

Re: [Hint] How did I fix my ODT file

Post by BarbaravdW »

Oh Im keeping my fingers and toes crossed in the (faint and fleeting) hope that something can be recovered...
Attachments
derde diagnostiekcasus L.odt
(62.82 KiB) Downloaded 89 times
open office 4.1.15 on windows 11
User avatar
MrProgrammer
Moderator
Posts: 5258
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Hint] How did I fix my ODT file

Post by MrProgrammer »

As expected, the blocks of the disk which Disk Drill found are not in the correct format to be a valid ODT document.

Archive:  derde diagnostiekcasus L.odt
[derde diagnostiekcasus L.odt]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.5, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
BarbaravdW
Posts: 3
Joined: Sat Jan 11, 2025 8:27 am

Re: [Hint] How did I fix my ODT file

Post by BarbaravdW »

This means it is beyond repair then? Im so grateful for your help btw!
open office 4.1.15 on windows 11
User avatar
LastUnicorn
Posts: 763
Joined: Sat Mar 29, 2008 2:41 am
Location: Scotland

Re: [Hint] How did I fix my ODT file

Post by LastUnicorn »

Perhaps missing knowledge that you need to understand what MrProgrammer said is when files/documents are saved by OpenOffice and LibreOffice they are packed as Zip archives (with the files for constructing the actual document packed inside the archive). In this instance the file name itself will not be NameOfDocument.zip but just the name of an OpenOffice/LibreOffice file — e.g. NameOfDocument.odt If you can't open the archive, the archive itself is corrupted, then there is no chance of getting at the files it should in theory contain that are, effectively, the content of your document/file.

On another note, as you are on Windows 11, you might want to consider switching from OpenOffice to LibreOffice. There are several good reasons for making the switch, some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information
LibreOffice 25.2.3.2 (x64) installed to Windows 11 Pro. 24H2
Apache OpenOffice Portable 4.1.15 [Portable Apps]
For Java I use Adoptium Temurin JRE LTS Releases.
mahwish
Posts: 6
Joined: Fri Oct 11, 2024 2:52 pm

Re: [Hint] How did I fix my ODT file

Post by mahwish »

BarbaravdW wrote: Sat Jan 11, 2025 8:43 am ....I am very much a digital idiot and am completely clueless how to fix this....
Stop calling yourself an idiot. If u would have been careful still openoffice files get corrupted one fine morning, this file corruption bug is there since 2010 or before. I recommend, switch to some other office suite or take the backup of your work twice a day "manually", if u insist using openoffice.
OpenOffice 4.1.3 on Windows 7
Post Reply