Using labels from an Excel file

Prev Next

Normally the headlines of the placeholders are written hard-coded into the report. This has the big advantage of the template being easy-to-read. However, if you need to support multiple language it has the disadvantage of needing a separate report for each language. The solution is to use labels instead of hard-coded text.

Steps

  1. Create an Excel file with the required languages.

    Spreadsheet showing language options and corresponding item descriptions in English and German.

    Excel file with two languages

    The Excel language file is integrated to the Data Map the same way as the connection file

  2. In Microsoft Word or Excel, go to the dox42 ribbon and select Data Map.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon

    The Data Map Designer window opens.

  3. Select the Excel button.

    Excel data source initialization window with fields for name and file selection.

    Excel window

  4. Insert a name for the Excel file.

  5. Insert the path from the Excel file, always using the <%DocPath%>.
    Example: <%DocPath%>..\MyFile.xlsx
    The ..\ tells the system to look a level above in the folder structure and there it will find an Excel file named MyFile.xlsx. Using <%DocPath%> makes it possible to copy the data map and insert it to another report folder without the need of changing the path.

  6. Select the Data Source Output tab.

  7. Select First Row of selected Range contains Column Names checkbox.

  8. Select the button to select the fields from the Excel file.
    The Excel file opens.

  9. Mark the area with all the data.

    Data mapping interface showing Excel data source configuration and highlighted data range.

    Data to be included from the Excel file

  10. Filter the Excel language file as follows.

    Filter and sort options displayed in a data management interface for language selection.

  11. Select OK.

  12. Change the hard-coded text label in the document template with the label placeholder.

    Highlighted ItemID with related fields for data entry in a user interface.

Result

Your document template is using the Excel labels instead of hard-coded text.