Example for sharing an Excel session between bots
- Updated: 2023/04/25
Example for sharing an Excel session between bots
Build two bots to update the employee salaries in a worksheet. In this example, one bot opens an Excel worksheet and passes the session name as a variable to the second bot, which iterates through the worksheet, calculates each employee's new salary, and updates the value in the worksheet.
Prerequisites
Create a worksheet with the following data:
Employee ID | Start date | Salary |
---|---|---|
200 | 1/12/2020 | 50000 |
233 | 3/15/2018 | 75000 |
500 | 6/6/2020 | 60000 |
555 | 7/9/2019 | 65000 |
Procedure
Build the child to iterate through the table of employees and update each salary to reflect the raise.
sCellAddress
.
- Drag into the Loop container the action.
-
Select the Shared session tab and insert
$sessionVariable$
. - Select the Active cell and One cell below options.
- Drag into the Loop container the action.
-
Select the Shared session tab and insert
$sessionVariable$
. - Select the Active cell option.
-
In the Save active cell address field, insert
$sCellAddress$
.
Build the parent bot.