SuperWEB2 users can download data from Table View in a variety of formats:
The templates for Excel and CSV downloads are located in <tomcat_home>\webapps\webapi\WEB-INF\templates:
|Template.csv||CSV downloads from Table View.|
|Template.csvString||CSV string value downloads from Table View.|
|XLS_Template.xls||Excel 2003 downloads from Table View.|
|XLSX_Template.xlsx||Excel 2007 downloads from Table View.|
To use your own branding for CSV and Excel downloads, simply replace the existing template file with your own version, as follows:
The two CSV templates are plain text files. They can contain any content you want, but must include the string #TABLE# (this will be replaced with the table contents).
Customised SuperWEB2(tm) CSV Download File Format
(c) Copyright Space-Time Research 2016
The easiest way to create your own Excel templates is to use the existing version as a basis and then customise that, rather than starting from scratch.
Your completed template file must contain the following three work sheets:
The contents of this work sheet do not appear in the downloaded file. It is used to define the formatting for the downloaded table.
For example, you can change the font, font size, as well as the background colours and borders:
|A1||Formatting for the table heading.|
|A2||Formatting for field names.|
|A3||Formatting for column field labels.|
|A4||Formatting for row field labels.|
|A5||Formatting for cell data.|
Formatting for the table footnote.
By default, SuperWEB2 will insert the table footnote in the first cell in the row below the table. If the footnote is too long to fit in the cell it will appear on a single row, overflowing the edge of that cell.
If you have a very long table footnote, you can configure SuperWEB2 to wrap the footnote text: enable Excel's Wrap text setting on cell A6 (right-click the cell and select Format Cells > Alignment > Wrap text) and SuperWEB2 will merge the cell containing the footnote across the width of the table and wrap the text (to minimum of 4 cells and maximum of 7 cells).
This setting can be used in conjunction with the annotation formatting options (cell A9).
|B7||The number of decimal places and the format of RSE data.|
|B8||The comment author for the generated table.|
Formatting for annotations.
By default, SuperWEB2 will insert all the annotations below the table, with the annotation symbols in column A and the corresponding descriptions in column B. If the descriptions are longer than the width of column B then the text will appear on a single row, overflowing the edge of that cell.
If you have very long annotations, you may wish to change the formatting of this cell to instruct SuperWEB2 to wrap the text of the annotation descriptions instead:
If you enable Excel's Wrap text setting on cell A9 (right-click the cell and select Format Cells > Alignment > Wrap text) then SuperWEB2 will merge the cell containing the annotation descriptions across the width of the table above and wrap the annotation text within those merged cells.
The annotations will be merged across a minimum of 3 cells (even if your table contains fewer than 3 columns) and maximum of 6 (even if your table contains more than 6 columns).
- You can also adjust the height of cell A9 and this will be applied to each row of annotations.
This work sheet will be used as the template for a standard table download. It can contain any content you like, but must include the string #TABLE# somewhere on the worksheet.
SuperWEB2 will replace #TABLE# and the following 2 rows with the table data.
This is an alternative template that will be used for the download if the Relative Standard Error (RSE) feature is enabled. In this case the RSE data will be included in the download in a separate work sheet.
As with the standard template it must include the string #TABLE# somewhere on the sheet. SuperWEB2 will replace this and the following 2 rows with the table data.