Tabular Output
Utilities[LINK]
Several utility routines are available to help generate
tabular reports. To create tabular reports, the developer
needs to create a routine called something like
WriteTabularX. The WriteTabularX routine should appear in
SimulationManger between the OpenOutputTabularFile and
CloseOutputTabularFile calls. The WriteTabularX routine
should make use of several utilities described below. The
“USE” statement reference OutputReportTabular module. Good
example of how to use this facility are in the
OutputReportTabular file and the EconomicTariff file.
Where reportName is the name that you want the report to be
called and the objectName is the name of the object that
appears after the “For:” for each instance of the report. The
averageOrSum flag when set to SUM adds the phrase “per second”
after the reportName.
WriteSubtitle(subtitle)[LINK]
Where the subtitle is a string that usually appears before
a specific table. This is useful if the report includes
multiple tables.
WriteTable(body,rowLabels,columnLabels,widthColumn)[LINK]
The WriteTable routine actually generates the tables that
appear in the tabular output file (CSV, HTML, or TXT). The
rowLabels and columnLables are both one dimensional string
arrays that contain the appropriate labels. If the column
labels strings include the vertical bar symbol “” then when
creating a text report, the labels will be split between lines
at the vertical bar. For HTML and CSV output, the vertical
bar symbols are removed prior to display.
The body array is a two dimensional array (row,column
order) containing the cells in the body of the table. It must
be strings so conversion utilities such as RealToStr should be
used to convert from numeric values.
WidthColumn is a one dimensional integer array containing
the column widths for use only with the fixed width text
output option.
Tabular Output Utilities[LINK]
Several utility routines are available to help generate tabular reports. To create tabular reports, the developer needs to create a routine called something like WriteTabularX. The WriteTabularX routine should appear in SimulationManger between the OpenOutputTabularFile and CloseOutputTabularFile calls. The WriteTabularX routine should make use of several utilities described below. The “USE” statement reference OutputReportTabular module. Good example of how to use this facility are in the OutputReportTabular file and the EconomicTariff file.
WriteReportHeaders(reportName,objectName,averageOrSum)[LINK]
Where reportName is the name that you want the report to be called and the objectName is the name of the object that appears after the “For:” for each instance of the report. The averageOrSum flag when set to SUM adds the phrase “per second” after the reportName.
WriteSubtitle(subtitle)[LINK]
Where the subtitle is a string that usually appears before a specific table. This is useful if the report includes multiple tables.
WriteTable(body,rowLabels,columnLabels,widthColumn)[LINK]
The WriteTable routine actually generates the tables that appear in the tabular output file (CSV, HTML, or TXT). The rowLabels and columnLables are both one dimensional string arrays that contain the appropriate labels. If the column labels strings include the vertical bar symbol “” then when creating a text report, the labels will be split between lines at the vertical bar. For HTML and CSV output, the vertical bar symbols are removed prior to display.
The body array is a two dimensional array (row,column order) containing the cells in the body of the table. It must be strings so conversion utilities such as RealToStr should be used to convert from numeric values.
WidthColumn is a one dimensional integer array containing the column widths for use only with the fixed width text output option.
Documentation content copyright © 1996-2026 The Board of Trustees of the University of Illinois and the Regents of the University of California through the Ernest Orlando Lawrence Berkeley National Laboratory. All rights reserved. EnergyPlus is a trademark of the US Department of Energy.
This documentation is made available under the EnergyPlus Open Source License v1.0.