STEM help

8.6.1 Using token replacement to populate an end-user download

Reports are generated by creating a copy of a template XLSX (or XLSM) file, modifying cells within this file that are marked for some form of modification and then saving this copy into a location from which it can be downloaded by the user. Note that the template file must be a spreadsheet saved only in XLSX (packaged XML) format.

The template file may contain any content supported by the file format, but note that we currently use OpenOffice software as part of the process of conversion to PDF, so formatting unsupported by OpenOffice Calc will be lost from PDF reports. Cells with content matching any of the following rules will have their content replaced by the export process. All other content in the spreadsheet will remain unaltered; thus a report can contain whatever text, images, formatting or other media the user chooses to place in it. Although STEM will not generate charts in the report, the user can add charts that reference cells to be replaced as their source data, so that charts of result data can be produced. The formatting of replaced cells will not be altered – only the content.

All content formats to be replaced will be string values starting with a user defined tag string (in the examples below this tag string is $STEM$). This must be specified in the WebServiceModelConfig.txt file – users will most likely do this via the Create Web Interface… dialog in the STEM editor, where it will default to $STEM$ if not set. Where a value is used that contains spaces, it should be enclosed in double-quote marks. For values without spaces, the quotes are optional. The specific keywords and their associated usage are described in detail in Token-replacement keywords for exported reports in Excel.

 

© Implied Logic Limited