Page 1 of 1

[Tutorial] ODF repair tool

PostPosted: Wed May 13, 2020 6:16 pm
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: ... 26&t=60992
Download the zip file 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.

Installation and overview

PostPosted: Wed May 13, 2020 6:17 pm
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.

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.

Step 1: Select the file

PostPosted: Wed May 13, 2020 9:48 pm
by Hagar Delest
This is the dialog when launching the tool:

Don't worry, it just tells you to open the menu Fichier > Ouvrir.

That is:

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

Step 2: Analysis of the damaged file

PostPosted: Wed May 13, 2020 9:56 pm
by Hagar Delest
You can now open the menu Fichier > Analyser (no longer grayed out):

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.

And you are asked to go to the menu Fichier > Extraire to extract the files contained in the damaged file that can be repaired.

Step 3: Extraction for repair

PostPosted: Wed May 13, 2020 10:47 pm
by Hagar Delest
You can now open the menu Fichier > Extraire (no longer grayed out):

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.

Step 4: Repair

PostPosted: Wed May 13, 2020 10:48 pm
by Hagar Delest
You can now open the menu Fichier > Réparer (File > Repair)
RepairTool-Repair.png (6.85 KiB) Viewed 1600 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.

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.

ODF file repair utility

PostPosted: Fri Dec 25, 2020 12:30 pm
by MJDut

On the French forum you can find a new powerful bilingual version of the file repair utility : ... 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


Re: [Tutorial] ODF repair tool

PostPosted: Sun Feb 07, 2021 4:33 pm
by MJDut

Here : ... 50#p330650
A new version (English, French and Italian) correcting some bugs.
And a new tutorial