EXCEL Merge workbooks function

The EXCEL Merge workbooks function in RPA.

Help CentreBuilding 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:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down
  3. Click on “+ Activity”
  4. Select the EXCEL Merge workbooks option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
Destination workbookYesText-The file path of the destination workbook to merge sheets into
ModeNoSelectAppendHow 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

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.