Collection of functions to ease MS Excel operations within an automation.
Retrieve the cell range values from a specified worksheet. A dedicated configuration screen is available in order to map the values from the worksheet to an existing data type or a new data type.
Technical Name |
Type |
Minimal Agent Version |
excelCloudMapping |
synchronous
|
WIN-2.0.0, MAC-3.17
|
Input Parameters:
Name |
Type |
Attributes |
Default |
Description |
excelMapping |
any |
mandatory
|
|
How to map data from Excel to the data type. |
workbookPath |
string |
mandatory
|
|
Path of the workbook containing the data. |
worksheetName |
string |
optional
|
|
Name of the worksheet to use. If not defined, the active worksheet is used. |
rangeDefinition |
string |
optional
|
|
Range definition of cells. 'A;5;G;67' or '1;5;7;67' or 'A5:G67' for a range. A;8 or 1;8 or A8 for a single cell, or 'A:G' for dynamic range detection. |
containsHeaders |
boolean |
optional
|
|
Indicates whether the data contains headers. |
datatype |
any |
optional
|
|
Identifier of the data type representing the structure of the objects to return. |
convertDataFromType |
boolean |
optional
|
|
Set to false to retrieve the values from Excel as is. Set to true to retrieve and convert the values from Excel into the specified data type. |
Output Parameters:
Name |
Type |
Description |
returnedValues |
Array. |
Values of the range given in the parameters. |
Note:
The dynamic range detection calculate the area to work on between two given columns. The top row is determined by the first filled cell from the top of the first column. The last row is determined by going down from the top row to the the first encountered empty row.
Errors:
Error Class |
Package |
Description |
InvalidRangeDefinition |
irpa_excel |
If the parameter rangeDefinition is invalid or not supported. |
SequenceError |
irpa_core |
Please open Excel before to perform any activity. |
EditModeError |
irpa_excel |
Excel is in edit mode and cannot be automated. Please leave the edit mode manually. |
InvalidArgument |
irpa_core |
Dynamic Range is not supported in without excel mode. |