This post is about a script that exports OmegaT project to an XLS document with a separate worksheet for each source file.This script has been requested and kindly sponsored by cApStAn sprl
The scripts requires jxl.jar from JExcelApi located in the scripts folder (tested with version 2.6.10). Without the jar it won’t run.
The script itself needs to be downloaded here: write_excel_multiple_sheets.groovy.zip, and extracted to OmegaT scripts folder.
Each time the script runs, it creates a XLS file inside the
script_output subfolder in your project’s folder. The filename will be based on the project name and language pair (for instance,
Missale_Romanum (LA - SA).xls or
omegat-ru (EN - RU).xls)
The first worksheet of the resultant XLS file is sort of a mastersheet with links to all the other sheets, which in a way is similar to Project Files window in OmegaT:
Clicking on a filename or the sheet name in the list will get you directly to the corresponding file. To get back to the mastersheet, you need to click on the filename in the upper part of the sheet (B1).
The script will inform about its results in OmegaT status bar and Scripting window console.
The script is localizable (so make sure you put the .properties file along with the script itself, either to
properties subfolder, or on the same level where .groovy file is). Localization covers both script’s messages and a few captions in the resultant file.
Comments, suggestions, bug reports and friendly hugs are most welcome.
UPDATE: Briac Pilpre, whose ideas were used in the script, made a modification for a “horizontal layout” of the sheets, i. e. Segment # | Source | Target. His version can be found at this pastebin link. Setting the variable “
false in line 34 of the linked script (
def threeColumnsStyle = false) restores the “vertical layout” of the output file. Thank you, Briac, for the original idea to use jxl library, and for the current addition.
But as of now,