[Tutorial] ODF repair tool

Home made tutorials, by users, for users
Forum rules
No question in this forum please
For any question related to a topic, create a new thread in the relevant section.

[Tutorial] ODF repair tool

Postby Hagar Delest » Wed May 13, 2020 6:16 pm

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.

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.
User avatar
Hagar Delest
Moderator
 
Posts: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Installation and overview

Postby Hagar Delest » Wed May 13, 2020 6:17 pm

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: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 1: Select the file

Postby Hagar Delest » Wed May 13, 2020 9:48 pm

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: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 2: Analysis of the damaged file

Postby Hagar Delest » Wed May 13, 2020 9:56 pm

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: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 3: Extraction for repair

Postby Hagar Delest » Wed May 13, 2020 10:47 pm

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: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Step 4: Repair

Postby Hagar Delest » Wed May 13, 2020 10:48 pm

You can now open the menu Fichier > Réparer (File > Repair)
RepairTool-Repair.png
RepairTool-Repair.png (6.85 KiB) Viewed 77 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.
User avatar
Hagar Delest
Moderator
 
Posts: 28840
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests