Syntax
...
reporting_setupSheet(sheetName, headers, columnTypes, [headerRowsNo]);
Description
...
Excerpt |
---|
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. |
headers | string [] | Yes | This 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. |
columnTypes | number [] | 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:
|
headerRowsNo | number | No | The number of rows of the already defined header (available since 1.5.4/1.6.4) |
Return type
...
The returned value has no meaning.
Examples
...
Example 1
...
Code Block |
---|
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 |
...