Skip to end of banner
Go to start of banner

reporting_setupSheet

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 2 Next »

Syntax:

reporting_setupSheet(sheetName, headers, columnTypes);

Description:

Adds extra parameters to the internal setup configuration created with the reporting_setupTemplate routine.

There can be more than one call of this routine per reporting script. Successive calls that attempt to modify the settings for the same Excel worksheet will trigger an exception.

Parameters:

Parameter name

Type

Required

Description

sheetName

string

Yes

The worksheet name. The worksheet should exist in the template file, otherwise an exception will be thrown.

headersstring []YesThis parameter controls the names of the column headers for the data written in the Excel sheet. If empty, the first line already found in the current sheet will be left unmodified.
columnTypesnumber []Yes

This parameter controls the types of each column for the data written in the Excel sheet. If empty, all columns will be written as text.

The encodings are as follows:

  • 0: text value
  • 1: numeric value

Return type:

The returned value has no meaning.

Examples:

Example 1:

reporting_setupSheet("Data", {"Name", "Position", "Age", "Wage"}, {0, 0, 1, 1});
// first two columns are of type text, while the last two are of type number

Important

The template files must have been created with Excel 2007 or newer. Supported extensions are .xlsx and .xlsm. The older .xls extensions (Microsoft Office versions prior to 2007) are not supported.

 

(DRAFT)

  • No labels