When exporting a CSV or a file for Excel, special and simple templates must be used in order for the export to produce usable results.
The CSV template must generate a CSV header row as well as single rows for each "dataset". A simple template is included in the app.
The Excel template must only generate a HTML table with clean table rows and table cells. Table header rows will be formatted according to a hard coded style. All extra formatting will be ignored.
The CSV and Excel templates may always be exported in HTML format to verify proper formatting if required.
Example of a CSV Template
The variable $firstRun is only true during the first time this template is rendered. This is useful when exporting all Jira projects into one large CSV file, as this template will be called for each Jira project to be exported separately. The resulting data will be merged into a large CSV file.
Example of a XLS/XLSX Template
This template generates a simple table which is then converted into a Excel sheet in a workbook. When exporting all Jira projects at once each table will result in a new sheet in the same workbook and the sheet will be labeled after the projects key.