EXCEL Active sheet function

The EXCEL Active sheet function in RPA.

Help CentreBuilding Processes

This article describes the RPA Excel functionality to get the name of the currently active sheet.

For a full list of available functions, please read EXCEL functions.


Description

The EXCEL Active sheet function returns the name of the currently active (selected) sheet in the workbook. This is useful when you need to store or reference the current sheet name before switching to another sheet.


Setting it up

To use the EXCEL Active sheet function, follow these instructions:

{{popups:rpas/add:action=excel-active-sheet}}

Once on a process map:

  1. Navigate to the process where you would like to add the EXCEL Active sheet function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the EXCEL Active sheet option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
File pathYesTextFull path to the Excel file.
VariableNoTextactive_sheetName of the variable to store the active sheet name in.

Output variables

VariableTypeDescription
active_sheetStringName of the currently active sheet.

Errors

ErrorDescription
File not foundThe specified Excel file could not be found.
No active workbookNo workbook is currently open at the specified path.

Tips

  • Use this function to save the current sheet name before switching sheets, so you can return to it later.
  • The returned name matches the sheet tab label exactly, including capitalisation and spaces.

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.