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).
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:
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 up to 5 rows after that with the table data and associated messages such as the table title and any annotations. If you want to include any messaging at the bottom of your download (such as a copyright statement or attribution) then you should make sure it is far enough down your template file so that it does not get overwritten by 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 up to the following 5 rows with the table data and messages.