Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | excelSetCurrentSheet(workbookFID, worksheet_name_or_index) | Package | excel | Alias | | Pkg Usage | setCurrentSheet(workbookFID, worksheet_name_or_index) |
|
Description
Excerpt |
---|
|
Specifies the current sheet by name or index that subsequent processes should use. |
Specifies the current sheet by name or index that subsequent processes should use.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
workbookFID | Integer | Yes | The file id of the open workbook. The file id is returned from running the excelOpenWorkbook() routine. | worksheet_name_or_index | String | Yes | The name or index of the worksheet that should be set as current (index starts at 0). |
|
Return Type
Boolean
Returns true if the operation was successful, false otherwise.
Example
Add a new row and data to an existing workbook.
Code Block |
---|
|
use "excel";
int fid = openWorkbook("snakes.xlsx");
setCurrentSheet(fid, "Venemous Snakes");
addRow(fid, 1);
setCurrentSheet(fid, "Non-Venemous Snakes");
addRow(fid, 1);
closeWorkbook(fid); |
Result: A new row is first added to the Venemous Snake sheet then a new row is added to the Non-Venemous Snake sheet.
Note |
---|
Click here to download the workbook used in this example. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "excel_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|