Table of ContentsSet of activities related to MS Excel Online. Use the Workbook activities to activate, close, open, or close a workbook.
| Get Open Workbooks |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.getOpenWorkbooks | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Description |
|---|---|---|
| openWorkbooksList | Array.<irpa_365online.workbookInformation> | The list of workbooks that are open. |
| Error Class | Package | Description |
|---|---|---|
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Open Workbook |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.openWorkbook | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| driveId | string | optional | If empty, the local drive is used by default. Otherwise, the drive ID of the remote drive is used. | |
| pathOrFileId | string | mandatory | The path or the file ID of the workbook. |
| Name | Type | Description |
|---|---|---|
| workbookId | string | The workbook identifier. |
Sample Code:
// file located on a remote drive designated by its id, accessed by the file id const wbid = await irpa_365online.excel.workbook.openWorkbook('myDriveId', 'myfileId');
Sample Code:
// file located on the local onedrive, accessed by the file id const wbid = await irpa_365online.excel.workbook.openWorkbook(undefined, 'myfileId');
Sample Code:
// file located on the local onedrive, accessed by the file path const wbid = await irpa_365online.excel.workbook.openWorkbook(undefined, 'test/myfile.xlsx');
Note:
To open workbook, the workbook must be shared in read write mode
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error accessing the requested workbook. |
| NotFound | irpa_core | Ressource not found. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Open Workbook from Link Attachment |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.openWorkbookFromLinkAttachment | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| mailId | string | mandatory | ID of the mail from which you want to use the link attachment | |
| linkAttachmentName | string | mandatory | The name of the link attachment |
| Name | Type | Description |
|---|---|---|
| workbookId | string | The workbook identifier |
Sample Code:
// file located on a drive designated by its id, accessed by the file id const wbid = await irpa_365online.excel.workbook.openWorkbookFromLinkAttachment('dcpzcpzo', 'myWorkbook.xlsx');
Note:
To open workbook, the workbook must be shared in read write mode
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error accessing the requested workbook. |
| NotFound | irpa_core | Ressource not found. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Select Current Workbook |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.selectCurrentWorkbook | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| workbookId | string | mandatory | The workbook identifier. |
Sample Code:
// Select the workbook which id is myGuid (output of openWorkbook) await irpa_365online.excel.workbook.selectCurrentWorkbook('myGuid');
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | This workbook is not open. |
| InvalidArgument | irpa_core | workbookId is malformed. |
| Close Workbook |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.closeWorkbook | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| workbookId | string | mandatory | The workbook identifier. |
Sample Code:
// Close the workbook which id is myGuid (output of openWorkbook) await irpa_365online.excel.workbook.closeWorkbook('myDriveId', 'myfileId');
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | This workbook is not open. |
| RequestError | irpa_core | Error closing the workbook. |
| InvalidArgument | irpa_core | workbookId is malformed. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Get Values |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.getRangeValues | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| rangeDefinition | string | mandatory | The definition of the range. | |
| format | irpa_365online.enums.getFormat | optional | standard | The format of the result. |
| cellProperty | irpa_365online.enums.cellProperties | optional | values | The cell property to return (values, formulas, numberFormats). |
| Name | Type | Description |
|---|---|---|
| result | any | The formatted result from the range. |
Sample Code:
const values = await irpa_365online.excel.workbook.getRangeValues('A1:B2');
Sample Code:
// Get single value const values = await irpa_365online.excel.workbook.getRangeValues('A1');
Sample Code:
// Get row as a one dimension array const values = await irpa_365online.excel.workbook.getRangeValues('A1:C1', irpa_365online.enums.getFormat.reduceToList);
Sample Code:
// Get column as a one dimension array const values = await irpa_365online.excel.workbook.getRangeValues('A1:A10', irpa_365online.enums.getFormat.reduceToList);
Sample Code:
// Get values a objects which properties are describes in the first row of the range. const values = await irpa_365online.excel.workbook.getRangeValues('A1:B3', irpa_365online.enums.getFormat.objectsHeadersOnFirstRow);
Sample Code:
// Get formulas of the range. const formulas = await irpa_365online.excel.workbook.getRangeValues('A1:B3', undefined, irpa_365online.enums.cellProperties.formulas);
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | There is no current workbook. |
| RequestError | irpa_core | Error getting the values. |
| InvalidArgument | irpa_core | Error getting the values. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Set Values |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| workbook.setRangeValues | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| rangeDefinition | string | mandatory | The definition of the range. | |
| values | any | mandatory | Values of the range. | |
| cellProperty | irpa_365online.enums.cellProperties | optional | values | The cell property to return (values, formulas, numberFormats). |
Sample Code:
// Set values on a two dimensional range await irpa_365online.excel.workbook.setRangeValues('A1:B2', [['Hello', 'World'], [1, 2]]);
Sample Code:
// Set single value in a cell await irpa_365online.excel.workbook.setRangeValues('A1', 4);
Sample Code:
// Set values on a single row await irpa_365online.excel.workbook.setRangeValues('A1:C1', [['val1', 'val2', 'val3']]);
Sample Code:
// Set values on a single column await irpa_365online.excel.workbook.setRangeValues('A1:A3', [['val1'], ['val2'], ['val3']]);
Sample Code:
// Set the number format to change the display of numbers, dates, etc. await irpa_365online.excel.workbook.setRangeValues('A1:A3', [['hh::mm:ss'], ['d/m/yyyy'], ['0.00%']], irpa_365online.enums.cellProperties.numberFormat);
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | There is no current workbook. |
| RequestError | irpa_core | Error setting the values. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Get Worksheet List |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.getWorksheetList | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Description |
|---|---|---|
| worksheetList | any | The list of worksheets you want to retrieve. |
Sample Code:
const wslist = await irpa_365online.excel.worksheet.getWorksheetList();
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | There is no current workbook. |
| RequestError | irpa_core | Error getting the worksheet list. |
| Select Current Worksheet |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.selectCurrentWorksheet | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| worksheetName | string | mandatory | The name of the worksheet you want to select. |
Sample Code:
await irpa_365online.excel.worksheet.selectCurrentWorksheet('myWorksheet');
| Error Class | Package | Description |
|---|---|---|
| SequenceError | irpa_core | There is no current workbook. |
| NotFound | irpa_core | This worksheet could not be found in the current workbook. |
| RequestError | irpa_core | Error getting the worksheet list. |
| Get UsedRange Row |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.getUsedRangeRow | synchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Description |
|---|---|---|
| usedRangeRow | number | Row index of the used range in the active worksheet. |
Sample Code:
//get the row index of the used range in the active excel worksheet. const myRowIndex = irpa_365online.excel.worksheet.getUsedRangeRow();
Note:
The activity wil return 1 for an empty worksheet. Currently, for technical reason, this activity does not make the difference with a single value in A1.
| Get UsedRange Column |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.getUsedRangeColumn | synchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| columnInfoType | irpa_365online.enums.columnInfoType | optional | index | Column Info Type |
| Name | Type | Description |
|---|---|---|
| usedRangeColumn | any | Column index or name of the used range in the active worksheet. |
Sample Code:
//get the column index of the used range in the active excel worksheet. const myColumnIndex = irpa_365online.excel.worksheet.getUsedRangeColumn();
Note:
The activity wil return 1 or 'A' for an empty worksheet. Currently, for technical reason, this activity does not make the difference with a single value in A1.
| Create Worksheet |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.createWorksheet | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| name | string | mandatory | Name of the worksheet. |
Sample Code:
await irpa_365online.excel.worksheet.createWorksheet("New Worksheet");
Note:
The created worksheet is not automatically selected. To use it after its creation, please use the Select Worksheet activity after its creation.
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while creating a worksheet. |
| InvalidArgument | irpa_core | Invalid worksheet name. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |
| Delete Worksheet |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| worksheet.deleteWorksheet | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| name | string | mandatory | Name of the worksheet. |
Sample Code:
await irpa_365online.excel.worksheet.deleteWorksheet('Worksheet to be deleted');
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while deleting the worksheet. |
| NotFound | irpa_core | This worksheet could not be found in the current workbook. |
| InvalidArgument | irpa_core | Invalid worksheet name. |
| InvalidAuthenticationToken | irpa_365online | Invalid token was retrieved to call graphAPI. |