Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Syntax:

reporting_writeWorkbook()

Description:

Excerpt

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

Examples:

Example 1:

Code Block
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;

(DRAFT)