Skip to end of banner
Go to start of banner

reporting_writeWorkbook

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Syntax

reporting_writeWorkbook()

Description

Writes the data added with the reporting_addData routine to a temporary local file that will be further presented to the user in a Save As dialog from the gadget.

There can be only one call of this routine per template file. In order to make the Save As dialog to appear the reporting_writeWorkbook routine call result must be returned from the script. Otherwise the temporary file will be in the directory JIRA_HOME/kepler/reports/export, but it will not appear in the gadget. The result of the call will represent the full path of the resulting file.

Parameters

No parameters are required.

Return type

string

Example

Example 1

reporting_setupSheet("Data", {"Name", "Position", "Age", "Wage"}, {0, 0, 1, 1});
string[] data = {"John Doe", "Developer", "30", "1300.50", "Paul Smith", "Project Manager", "41", "2500.00"};
reporting_addData("Data", data);
// the call of the routine. the result is saved in a temporary variable
string fname = reporting_writeWorkbook();
// returning the variable, so that the gadget can use it
return fname;
  • No labels