Translating Excel Files with Wordfast Pro

From Wordfast Wiki
Jump to: navigation, search

Wordfast Pro has not yet implemented an Excel import wizard. Until this is done, you have three options when importing Excel files for translation.

Extract all Content for Translation

This is the default setting of the Excel filter. Simply add an Excel file to a project and all of its content will be extracted for translation.

Modify the Excel Filter or the File to Specify Content for Translation

Before importing your Excel file, you can modify the default Excel filter (XLS and/or XLSX) in the Wordfast Pro Preferences > Project Preferences > Filters to specify the content that needs to be extracted for translation. You may also want to pre-process the Excel file before importing. For example, you might be asked not to translate certain sheets but your client has not hidden them for you. Here is a list of extraction options that can be selected or deselected:

  • Extract sheet names
  • Skip cells with formulas
  • Skip hidden rows or columns
  • Treat numbers stored in text format as real numbers, which means they won't be extracted since numbers are non-translatable.
  • Translate data validation comments
  • Translate hidden sheets
  • Translate cell comments
  • Translate dropdown lists
  • Extract cells in column order (segment ordering would be A1, A2, A3, B1, B2, B3 as opposed to A1, B1, A2, B2, A3, B3)
  • Extract soft return strategy (set by default to be interpreted as a tag)

Use an XML configuration file

This is definitely the most complex way of specifying content to be extracted for translation. In time, the import wizard will be implemented which can be used instead of this method. To use an XML configuration file:

  1. Download a template XML file here.
  2. Open the Excel file to be translated to identify what needs to be translated. Keep this open while configuring the XML file.
  3. Open the excelConfig.xml template file using a text editor. We recommend the free TextWrangler for Mac or Notepad++ for PC. Excel XML Configuration file
  4. The first section (under <!-- Configuration for Excel filter (ConvertXLS) -->, row 4), contains default settings that are familiar from the Excel filter options in the Wordfast Pro Preferences. You can change true to false or false to true depending on what you want.
    1. If your Excel file contains HTML tags such as <b> for bold, <i> for italics, etc., you should convert said HTML tags into Wordfast tags.[1] Otherwise, they will be extracted as translatable text and will be a pain to replicate in Wordfast. Moreover, they will pollute your TM with non-sensical codes.
    2. Copy and paste the following regular expression between the <regexp> and </regexp> tags to convert embedded HTML tags and entities into Wordfast tags: &lt;[^&gt;]*&gt;
  5. The next section (under <!-- worksheet configuration can be placed here -->, row 17), is used to specify for each or every sheet:
    1. What row the translation should start and end on
    2. Which columns should be translated and if the translation should be placed in the same or another column
    3. If the number of characters per cell in a column should be restricted
  6. If different sheets in the workbook require different configurations, copy the entire section between the <sheet> and </sheet> tags (rows 19 and 48 in the image above) and paste it as many times as necessary under the </sheet> tag.
  7. Save your XML Configuration file once finished and use it to create a new XLS or XLSX filter in Wordfast Pro:
    1. At the Project List view, click on Preferences (or press F9).
    2. Under the "New Project Preferences" section, click on Filters.
    3. Click on the Add button.
    4. Choose the format of the Excel file you need to translate (XLS or XLSX).
    5. Name your filter something that is easily recognizable and that you can remember, e.g. Bilingual Excel A into B, where bilingual indicates that both the source and target languages will be present in the translated file, and A into B indicates that the source text is in column A and the target is in column B.
    6. Tick all boxes that correspond to true using in the XML configuration file[2]
    7. Browse to load your XML Configuration file.
    8. Click on OK.
    9. Click on OK to close the "Preferences" window and save your settings.[3]
  8. Create a project.
  9. After adding your Excel file, select the appropriate filter under the Type column (unless you have specified your XML configured filter as default).
  10. Complete the project creation wizard to create a bilingual file and begin translation.

Note: Any text between <!-- and --> is only there to help you. You can leave it in the file or you can delete it; this will not affect how the Excel content is extracted.

Click to download a sample Excel file and its corresponding XML configuration file.

Forbidden Characters

Wordfast Pro is unable to save a translated Excel document when the following forbidden characters are used in worksheet names:

: \ / ? * [ ]

Potential Problems

Wordfast Pro will also fail to save the translated Excel file if the translation contains duplicate sheet names, i.e. the same translation was made for two or more sheet names. A general error message will be shown in this case: "An error occurred while saving the document. More details: An unexpected error occurred during align of the file. java.lang.RuntimeException: There was a problem aligning excel document."

If the sheet name exceeds 31 characters, a red flashing border will appear around the segment length field in the status bar. When saving the translated file, the sheet name will automatically be cut off to 31 characters.


  1. This usually happens when web content has been extracted from a website into an Excel file and the translation will be re-imported later from the Excel file.
  2. Author's note: DOUBLE CHECK with developers whether this is necessary or if the XML configuration overrides all options by default.
  3. If you regularly need to use this newly created filter, you can set it as default before closing the "Preferences" window.