~4 min6 / 14

Excel Activities

Excel activities use a parent-child pattern. Wrap operations inside an Excel Application Container to open a workbook and share an Excel session across all child activities. The container handles Excel lifecycle (open, save, close) so child activities only need to specify the operation and (optionally) sheet name.

Excel Add MacroExcel Add Macro

Embeds a VBA module permanently into the active workbook. The workbook must be macro-enabled (.xlsm). Requires VBA project trust.

ParameterTypeRequiredDefaultDescription
ModuleNameStringYesName for the VBA module (e.g. 'MyMacros'). This becomes the module name in the VBProject.
VBACodeStringYesThe VBA source code to embed. Can contain multiple Subs/Functions. Click ⋯ to open the VBA editor.
OverwriteBooleanNoTrueIf a module with the same name already exists, replace it. Default: true.
MacroNameOutputStringNomacroNameVariable name to store the first Sub/Function name found in the VBA code. Use this variable in ExcelRunMacro to call the macro dynamically.

Excel Add SheetExcel Add Sheet

Adds a new worksheet to the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringYesThe name of the new worksheet to add.

Excel Application ScopeExcel Application Container

Opens an Excel workbook and provides a session for child activities. Manages performance flags, preflight checks, and cleanup automatically.

ParameterTypeRequiredDefaultDescription
FilePathStringNoPath to the Excel workbook to open.
VisibleBooleanNoFalseWhether Excel should be visible during automation.
ReadOnlyBooleanNoFalseOpen workbook in read-only mode.
CreateIfMissingBooleanNoFalseCreate the workbook file if it doesn't exist.
PasswordStringNoPassword for protected workbooks.
MacroPolicyStringNoFollowSystemHow to handle macro security (FollowSystem, PreferEnable, PreferDisable). Allowed: FollowSystem, PreferEnable, PreferDisable
ValidateTrustedLocationBooleanNoFalseVerify workbook is in a Trusted Location.
ValidateVBATrustBooleanNoFalseVerify VBA project object model access is enabled.
ValidateMOTWBooleanNoFalseVerify workbook has no Mark of the Web.
DisableScreenUpdatingBooleanNoTrueDisable screen updating for performance.
SetManualCalculationBooleanNoTrueSet calculation to manual for performance.
RestoreExcelStateBooleanNoTrueRestore Excel state (screen updating, calculation) after children complete.
CloseAfterCompletionBooleanNoTrueClose Excel session after child activities complete.
SaveOnCompleteBooleanNoTrueSave the workbook before closing.

Excel Auto FilterExcel Auto Filter

Applies AutoFilter to a range in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet to filter. If empty, uses the active sheet.
RangeStringYesThe cell range to apply AutoFilter to (e.g. 'A1:D100').
ColumnStringNo1The 1-based column index within the range to filter (default: 1).
CriteriaStringNoThe filter criteria value. Leave empty to clear the filter.

Excel Delete SheetExcel Delete Sheet

Deletes a worksheet from the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringYesThe name of the worksheet to delete.

Excel Execute VBAExcel Execute VBA

Injects and executes VBA code in the active Excel workbook. Requires VBA project trust.

ParameterTypeRequiredDefaultDescription
VBACodeStringYesThe VBA source code to inject (a Sub or Function definition). Click ⋯ to open the VBA editor.
EntryPointStringYesThe name of the Sub or Function to call after injecting the code.
OutputVariableStringNovbaResultVariable name to store the VBA return value (if any).

Excel Format RangeExcel Format Range

Applies formatting to a range in the active Excel workbook. Only specified properties are changed.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet containing the range. If empty, uses the active sheet.
RangeStringYesThe cell range to format (e.g. 'A1:D10').
BoldStringNoSet to 'true' or 'false' to toggle bold. Leave empty to keep existing.
ItalicStringNoSet to 'true' or 'false' to toggle italic. Leave empty to keep existing.
UnderlineStringNoSet to 'true' or 'false' to toggle underline. Leave empty to keep existing.
FontSizeStringNoFont size in points (e.g. '12'). Leave empty to keep existing.
FontColorStringNoFont color as #RRGGBB hex (e.g. '#FF0000') or named color ('red', 'blue').
FontNameStringNoFont family name (e.g. 'Arial', 'Calibri'). Leave empty to keep existing.
BackgroundColorStringNoCell fill color as #RRGGBB hex or named color.
NumberFormatStringNoExcel number format string (e.g. '#,##0.00', 'dd/MM/yyyy').
HorizontalAlignmentStringNoHorizontal alignment: 'left', 'center', or 'right'. Allowed: left, center, right

Excel Get Cell ValueExcel Get Cell Value

Reads the value of a single cell from the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet to read from. If empty, uses the active sheet.
CellStringYesThe cell address to read (e.g. 'A1', 'B2').
OutputVariableStringNocellValueVariable name to store the cell value. Defaults to 'cellValue'.

Excel Get FormulaExcel Get Formula

Gets the formula from a cell in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet containing the cell. If empty, uses the active sheet.
CellStringYesThe cell address to read the formula from (e.g. 'A1', 'B2').
OutputVariableStringNocellFormulaVariable name to store the formula string.

Excel Get Sheet NamesExcel Get Sheet Names

Returns a list of all sheet names in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
OutputVariableStringNosheetNamesVariable name to store the list of sheet names. Defaults to 'sheetNames'.

Excel Read RangeExcel Read Range

Reads a range from an Excel worksheet and stores it as a DataTable variable.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet to read. If empty, the first sheet (or active sheet in container mode) is used.
RangeStringNoCell range to read (e.g. 'A1:D10'). If empty, reads the entire used range.
HasHeadersBooleanNoTrueIf true, the first row is used as column headers.
FilePathStringNoPath to the Excel file. Only required when used outside an Excel Application Scope.
OutputVariableStringNoexcelDataVariable name to store the resulting DataTable. Defaults to 'excelData'.

Excel Rename SheetExcel Rename Sheet

Renames a worksheet in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
OldNameStringYesThe current name of the worksheet.
NewNameStringYesThe new name for the worksheet.

Excel Run MacroExcel Run Macro

Runs a named macro (Sub or Function) in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
MacroNameStringYesThe name of the macro to run (e.g. 'Sheet1.MyMacro' or 'MyModule.Calculate').
ArgumentsStringNoComma-separated positional arguments to pass to the macro.
OutputVariableStringNomacroResultVariable name to store the macro return value (if any).

Excel Save WorkbookExcel Save Workbook

Saves the active Excel workbook. Optionally saves to a new file path (Save As).

ParameterTypeRequiredDefaultDescription
SaveAsPathStringNoOptional file path to save the workbook to (Save As). If empty, saves in place.

Excel Set Cell ValueExcel Set Cell Value

Writes a value to a single cell in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet to write to. If empty, uses the active sheet.
CellStringYesThe cell address to write to (e.g. 'A1', 'B2').
ValueStringYesThe value to write. Supports variable references. Numbers and booleans are auto-converted.

Excel Set FormulaExcel Set Formula

Sets a formula on a cell in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet containing the cell. If empty, uses the active sheet.
CellStringYesThe cell address to set the formula on (e.g. 'A1', 'B2').
FormulaStringYesThe Excel formula to set (e.g. '=SUM(A1:A10)', '=VLOOKUP(B1,Sheet2!A:B,2,FALSE)').

Excel Sort RangeExcel Sort Range

Sorts a range by a specified column in the active Excel workbook.

ParameterTypeRequiredDefaultDescription
SheetNameStringNoThe worksheet containing the range. If empty, uses the active sheet.
RangeStringYesThe cell range to sort (e.g. 'A1:D100').
SortByColumnStringYesThe column to sort by — a cell address (e.g. 'A1') or column range (e.g. 'B:B').
AscendingStringNotrueSort order: 'true' for ascending (default), 'false' for descending.

Excel Write RangeExcel Write Range

Writes a DataTable to an Excel worksheet starting at the specified cell.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe variable name containing the DataTable to write.
SheetNameStringNoSheet1The target sheet name. Defaults to 'Sheet1'.
StartCellStringNoA1The cell to start writing at (e.g. 'A1'). Defaults to 'A1'.
WriteHeadersBooleanNoTrueIf true, writes column names as the first row.
FilePathStringNoPath to the Excel file. Only required when used outside an Excel Application Scope.
Was this helpful?