[Tutorial] ODF repair tool

Home made tutorials, by users, for users
Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Post Reply
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

[Tutorial] ODF repair tool

Post by Hagar Delest »

On the French forum, the user Scrat has created a tool to repair ODF files (.odt, .ods, .odp...) or even OOXML files (.docx, .xlsx, .pptx...).

The last version can be downloaded on the French forum: https://forum.openoffice.org/fr/forum/v ... 26&t=60992
Download the zip file ODFRepar_v_X_Y_Z.zip. With X_Y_Z being the version.
In this tutorial, the version is taken as 1_0_1.

Note: updates are announced at the end of this thread.

It includes a folder ODFRepar_v_1_0_1, where is located the executable ODFRepar.jar and a sub-folder lib with the libraries required.

The tool is coded in java, it is thus cross-platform.
 Edit: As of FEB-2021:
New version (English, French and Italian) correcting some bugs.
And a new tutorial 
To launch in English (command line):

Code: Select all

java -jar {path_to_ODFRepar_v_X_Y_Z_folder}/ODFRepar.jar "en"
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Installation and overview

Post by Hagar Delest »

Unzip the archive and put the folder ODFRepar_v_1_0_1 anywhere you want.

Java must be installed on your machine (usually the case).
Note that the tool does not work with OpenJDK 9 due to a bug with the Swing library (handling the graphical interface).
Java from Oracle or OpenJDK11 work just fine.

You have 2 possibilities to launch the tool:
  • Double-clic on the ODFRepar.jar
  • Command line with: java -jar {path to ODFRepar_v_1_0_1}/ODFRepar.jar
    Note: use a Unix/Linux-like syntax, with slashes / as separators (and not anti-slashes \) for folders
A window opens with a toolbar with Fichier and Aide menus (File and Help), and a text area.
Use the Fichier menu and look at the text area for the progress.
1. Menu Fichier -> Ouvrir (Open) to select the file to be repaired.
2. Menu Fichier -> Analyser (Analyze) to start the analysis of the file. It provides information on the findings and the chances of success.
3. Menu Fichier -> Extraire (Extract) to extract the content that can be retrieved. You have to select or create an empty folder.
4. Menu Fichier -> Réparer (Repair) to reassemble the archive with all the elements repaired in the folder used for extraction. The XML files are automatically repaired.
Note: you have to complete each step before accessing the next one.

Warnings:
If the file is too badly damaged, the repair tool may fail to retrieve anything at all.
Always use the tool with a copy of the damaged file. No need to wreck it further, keeping the file might be useful if another method can help.
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 1: Select the file

Post by Hagar Delest »

This is the dialog when launching the tool:
RepairTool-UI.png
Don't worry, it just tells you to open the menu Fichier > Ouvrir.

That is:
RepairTool-Open.png
The repaired file will be saved in the same file as the selected file but with a different name.
If the file is damaged_file_copy.odt, then the repaired file will be damaged_file_copy_repare.odt
RepairTool-Selected.png
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 2: Analysis of the damaged file

Post by Hagar Delest »

You can now open the menu Fichier > Analyser (no longer grayed out):
RepairTool-Analysis.png
Will follow in the text area the progress of the analysis with information about what is wrong.

You can access the log at the end of the analysis.
RepairTool-Analysis-completed.png
And you are asked to go to the menu Fichier > Extraire to extract the files contained in the damaged file that can be repaired.
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 3: Extraction for repair

Post by Hagar Delest »

You can now open the menu Fichier > Extraire (no longer grayed out):
RepairTool-Extract.png
The tool pops up a file explorer asking you to select a folder to extract the files to be repaired.
Make sure you select an empty folder. Or create a new one.
Then, you can see the progress in the text area. At the end, the important thing is the message about the blocks read.
  • The message "FIN DE LECTURE DE BLOCS !" means success.
  • The message "ERREUR DE LECTURE DE BLOC !" means that the process failed.
The status is then provided:
  • "fichier récupéré" means that the file can be recovered
  • "fichier partiellement récupéré" means that the file can be partially recovered
  • "fichier irrécupérable" means that the file cannot be repaired, at least with this tool.
RepairTool-Extraction.png
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 4: Repair

Post by Hagar Delest »

You can now open the menu Fichier > Réparer (File > Repair)
RepairTool-Repair.png
RepairTool-Repair.png (6.85 KiB) Viewed 13088 times
The tool repacks all the files from the extraction folder.

A status is provided, listing the untouched files ("intact" label) and the repairs done to the other files.
RepairTool-Final.png
The file name and the folder are also provided.

Note that the extraction folder includes the original files AND the repaired XML files with the tag "_repare" at the end of the file name. That is the version repacked in the repaired file.
You should now be able to open the repaired file.
MJDut
Posts: 4
Joined: Fri Dec 25, 2020 11:12 am

ODF file repair utility

Post by MJDut »

Hello,

On the French forum you can find a new powerful bilingual version of the file repair utility : https://forum.openoffice.org/fr/forum/v ... 26&t=60992
Direct download : ODFRepar_v_1_0_4
You need Java installed.
It starts in English on English-speaking systems, in French on any other system.
Intuitive and easy to use.
It allows to repair an ODF file (.odt, .ods, .odp, .odg, .odb extensions) or Microsoft (.docx, .xslsx, .pptx extensions) in just four interactions.
If the corruption is moderate, you directly get a repaired and usable ODF file.

At the moment, tutorial is French but coming soon in English and perhaps could you translate it ? ;)

Thanks to Hagar Delest for adding this information to this thread

Regards
OpenOffice 4.1.10 on macOS 11.4
MJDut
Posts: 4
Joined: Fri Dec 25, 2020 11:12 am

Re: [Tutorial] ODF repair tool

Post by MJDut »

Hi,

Here : https://forum.openoffice.org/fr/forum/v ... 50#p330650
A new version (English, French and Italian) correcting some bugs.
And a new tutorial
OpenOffice 4.1.10 on macOS 11.4
Post Reply