In this page
Excel spreadsheet properties
The app generates a sensible default title and default filename for each output Excel spreadsheet. You can optionally override one or both of those via the template. This offers an easy way to generate consistent document properties.
How is the title used? Well, it is completely up to the template. Most typically, the title is displayed in the top part, in the header, in some cover page, or the template may not use it at all.
How is the filename used? It will be offered as the default filename when downloading and saving the Excel spreadsheet from the browser. Therefore, properly defining the filename via the template can eliminate the need for tedious file renames.
Default title
The default title is generated according to the following logic:
- "issue key" for single issues (e.g. "FOO-123")
- "search request name" for saved filters with a name (e.g. "Team Alpha Pending Tickets")
- "Excel view name (Jira title)" for ad-hoc searches without a name (e.g. "Worklog Report (ACME Jira)")
Customizing titles
To override the title for the generated Excel spreadsheet, just assign a string to the context variable title any time during the rendering process. Please note that this variable originally contains the default title, allowing you to set the final title based on the default one. (Please see the scripting tutorial for executing scripts and defining context variables.)
In Groovy:
// "title" is a standard Java String, not a GString title = "Pending tickets - ${new Date().format('yyyy-MM-dd')}".toString()
This example will generate timestamped titles, e.g. "Pending tickets - 2016-11-20".
Default filename
The default filename is simply the title plus the ".xlsx" file extension, e.g. "FOO-123.xlsx" or "Team Alpha Pending Tickets.xlsx". Or, if you are using an ".xlsm" template, then the filename defaults to "FOO-123.xlsm".
Customizing filenames
Similarly to the title, to override the filename, just assign a string to the context variable filename. You can do this any time during the rendering process.
In Groovy:
// "filename" is a standard Java String, not a GString filename = "pending-tickets-${new Date().format('yyyy-MM-dd')}.xlsx".toString()
This example will generated timestamped filenames based on the title, e.g. "pending-tickets-2016-11-20.xslx".
Questions?
Ask us any time.