Prepare and create Excel (XLSX) reports

Modified: 11 Mar 2026 Tekla Structures 2026

Prepare and create Excel (XLSX) reports

You can create Excel (.xlsx) reports in Tekla Structures. The content and formatting of these reports is defined using an .xlsx.rpt template created with Template Editor and an .xltx template created with Microsoft Excel.

Compared to the older HTML-based templates or Organizer, the Excel (.xlsx) reporting method:

  • Eliminates VBA macros: You no longer need to create and maintain complex, brittle VBA macros, which are difficult to edit and are increasingly restricted by corporate IT security policies.
  • Provides full formatting control: Unlike the limited HTML-based report (.xls.rpt), this method allows for fully pre-configured Excel templates (.xltx). You can define company logos, headers/footers, print settings, cell formats, and advanced table styles. The final report is a native, ready-to-use Excel file.
  • Improves security and compatibility: The resulting modern .xlsx format is the industry standard and avoids security filters that often block or quarantine older macro-enabled .xls files.
  • Streamlines workflow: The process is more direct and intuitive, reducing the steps to get a polished, finalized report from Tekla Structures.

Notes and limitations

  • For complex formatting, like using Excel built-in table styles for alternating row colors, we highly recommend you to define it within the .xltx Excel template, rather than relying on the basic formatting options in the .rpt file.
  • Report logic, such as if statements, is handled within the Template Editor value field formulas, not within the export process itself.
  • To use {} as literal characters in the Excel template, avoid using them for non-attribute text. The curly brackets {} are reserved for Tekla Structures attributes, but a cell can contain multiple attributes and other text (for example, "Part: {PART_POS}, Weight: {WEIGHT}").

Steps to produce an XLSX report

  1. In Microsoft Excel, prepare the Excel template (.xltx).

  2. In Template Editor, prepare the textual template (.xlsx.rpt).
  3. In Tekla Structures, export the Excel report (.xlsx).

For details, see the instructions below.

Prepare Excel template (.xltx)

  1. In Microsoft Excel, design your report template.

    Define the desired layout, including company logos, static text, cell formatting, formulas, and print settings.

  2. In header cells, insert project attribute placeholders to tell Tekla Structures where to insert data, like {PROJECT.USERDEFINED.P_PROJ_INFO_1}.
    • Project/report attributes: Place Tekla Structures attributes inside curly brackets (for example, {PROJECT.NUMBER}, {PROJECT.NAME}) in any cell. These will be populated with the corresponding project information upon export.
    • Main data insertion point:
      • By default, data is added to the first empty row in the Excel template. The last row in the Excel template that has content is treated as the header row. The first empty row here means the first empty row that does not have any data after it (no cells containing data).
      • Optionally, a special text string, "%&O%&", can be placed in a cell to mark where the main data rows from the .rpt file will be inserted. The string can optionally include the header row number, for example, "%&O5%&". The row containing this string is cleared, and the data is inserted starting from the next row. If the header row is not specified, the last row before the insertion point that has content is treated as the header row for column matching. See an example in the "Examples" section below.
      • Define column headers for your data table. The data will typically be inserted after the defined header row in the first available empty row, making the special string "%&O%&" optional. However, if the data should be inserted somewhere other than the first empty row, or if a different row than the one just above the insertion point should be used as the header row, then you must manually type the special string "%&O%&" in the desired cell.
  3. Save the file as an Excel template (.xltx) in one of the company standard Tekla Structures folders (model, project, firm, or system).

Prepare textual template (.xlsx.rpt)

  1. In Template Editor, create a new textual template, or modify an existing one.
  2. The header section in the template is ignored during the Excel export but can be used for instructions. The last line of the header can contain the column headers for the data rows. The column headers can be used to match columns with the .xltx template.

    The header is optional, but is required if column mapping (export setting Match columns between report template and Excel template) is to be used. If the columns are in the same order in both files, mapping is not necessary.

  3. Add the required value fields to the row component.

    A text object containing a semicolon (;) must be placed between the value fields to act as a column separator.

  4. Save the report with the .xlsx.rpt extension in one of the company standard Tekla Structures folders (model, project, firm, or system).
For more information about creating textual templates, see Create a textual template.

Export Excel report

  1. Open the model.
  2. If needed, number the model.
  3. On the Drawings & reports tab, click Reports.
  4. In the Report dialog, select a report template with the .xlsx suffix.

  5. Do one of the following:
    • To run a report on the entire model, click Create from all.
    • To run a report on the selected model objects, click Create from selected.
  6. In the displayed Export data to Excel dialog, select the Excel template (.xltx) to use and define the export settings.

    The available options:

    • Excel template: Select the target .xltx template from the dropdown list. The list shows Export to an empty sheet, up to 10 recently used templates, and all available templates from the standard folders.
    • Configure the export using the checkboxes. These settings are preserved for the current Tekla Structures session.
      • Export column headers defined in the report template: Exports the column headers from the .xlsx.rpt file as the first row of the data block.
      • Match columns between report template and Excel template: Maps the columns from the .rpt file to the columns in the .xltx file by matching the header names. If this is not selected, columns are inserted in the order they appear in the .rpt file.
      • When unmatching columns are found: Select one of the following options which are available only if Match columns between report template and Excel template is selected:

        Discard unmatching columns: Columns from the .rpt file that do not have a matching header in the .xltx template will not be included in the export.

        Keep unmatching columns: The unmatching columns will be exported and placed to the right of the columns defined in the .xltx template.

      • Export font styles: Exports the bold and italic styles set in the .rpt file.
      • Export borders: Exports the border settings defined for rows in the .rpt file. Borders can also be defined for individual text objects and value fields in the row component, which apply to single cells. Row border settings apply to the entire exported row, not just cell-to-cell borders.
      • Export row background colors: Exports the background colors defined for rows in the .rpt file.
  7. To generate the .xlsx file, click Export.

Examples

Excel template example

In the following .xltx template example, the %&O%& string has been placed in a cell to mark where the main data rows from the .xlsx.rpt file will be inserted.

To see the example template in a larger size, right-click the image and select the option to open the image in another browser tab or window.

XLSX.RPT example

Below is an example with a part of the Template Editor xlsx.rpt template containing column headers for the data rows and the needed value fields.

To see the example template in a larger size, right-click the image and select the option to open the image in another browser tab or window.

XLSX example

Below is an example of the final report where data from the model has been retrieved.

To see the example report in a larger size, right-click the image and select the option to open the image in another browser tab or window.

Was this helpful?
Submit
Previous
Next