Help Centre › Building Processes
This article describes the RPA Excel functionality to merge workbooks.
For a full list of available functions, please read EXCEL functions.
Description
The Merge workbooks function copies all sheets from the current workbook into a destination workbook. You can choose to append new sheets or replace existing sheets with the same name.
This is useful for consolidating data from multiple source files into a single master workbook.
Setting it up
To use the Merge workbooks function, follow these instructions:
{{popups:rpas/add:action=excel-merge-workbooks}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down
- Click on “+ Activity”
- Select the EXCEL Merge workbooks option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Destination workbook | Yes | Text | - | The file path of the destination workbook to merge sheets into |
| Mode | No | Select | Append | How to handle sheets: Append adds new sheets, Replace overwrites sheets with the same name |
Output
This function does not return a value. Sheets are copied into the destination workbook.
Errors
- File not found – the destination workbook path does not exist
- File locked – the destination workbook is open by another process
Tips
- The destination workbook must already exist – create it first if needed
- Use Append mode when consolidating data from multiple source files in a loop
- Use Replace mode when refreshing a master workbook with updated data
- Sheet names must be unique in Excel – in Append mode, duplicate names may be auto-renamed