Example for sharing an Excel session between bots
- Updated: 2024/04/16
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.
$sessionVariable$
.
sCellAddress
.
- Drag into the Loop container the action.
- Select the Active cell and from the drop-down menu, select One cell below.
-
In the Session name tab, insert
$sessionVariable$
.
- Drag the action.
- In the Cell option field, select Active cell option .
-
In the Session name tab, insert
$sessionVariable$
. -
Click the In the Session name tab, insert
$sessionVariable$ drop-down menu and select
$sCellAddress$
.
Build the parent bot.