~4 min6 / 12

Excel Activities

Automate Microsoft Excel workbooks using the COM interop engine. All Excel activities must be placed inside an Excel Application Container, which opens the workbook and maintains the COM session for the duration of the container. 18 activities cover reading, writing, sheet management, formatting, formulas, filters, sorting, macros, and VBA.

Excel Application Container

Opens an Excel workbook via COM (or creates it if missing) and provides the Excel session context to all child activities. Saves and closes the workbook on exit by default.

ParameterTypeDefaultDescription
FilePathStringAbsolute path to the .xlsx / .xlsm / .xlsb workbook
VisibleBooleanfalseShow the Excel window during automation
ReadOnlyBooleanfalseOpen the workbook in read-only mode
CreateIfMissingBooleanfalseCreate the workbook file if it does not exist
SaveOnCompleteBooleantrueSave the workbook when the container exits
CloseAfterCompletionBooleantrueClose the Excel instance after the container exits
MacroPolicyFollowSystem | PreferEnable | PreferDisableFollowSystemMacro trust level when opening .xlsm files
BodyActivity sequenceExcel child activities to run in scope
workflow
1Excel Application Container FilePath="C:\Reports\sales.xlsx" Visible=false
2 Body:
3 Excel Read Range SheetName="Sheet1" Range="A1:D100" OutputVariable="salesData"
4 For Each Row DataVariable="${salesData}" RowVariable="row"
5 Body:
6 ...

Excel Read Range

Reads a cell range into a DataTable variable.

ParameterTypeRequiredDescription
SheetNameStringNoSheet to read from (defaults to the active sheet)
RangeStringNoA1 notation range (e.g., A1:D100). Leave empty to read the entire used range.
HasHeadersBooleanNo (default: true)Treat the first row as column names
OutputVariableStringYesVariable to store the resulting DataTable

Excel Write Range

Writes a DataTable into the workbook starting at a specified cell.

ParameterTypeRequiredDescription
DataVariableStringYesDataTable variable to write
SheetNameStringNoTarget sheet (defaults to active sheet)
StartCellStringNo (default: A1)Top-left cell to begin writing
WriteHeadersBooleanNo (default: true)Write column names in the first row

Excel Get Cell Value

Reads the value of a single cell.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
CellStringYesCell address, e.g. B5
OutputVariableStringYesVariable to store the cell value

Excel Set Cell Value

Sets the value of a single cell.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
CellStringYesCell address
ValueStringYesValue to write (supports variable references)

Excel Get Sheet Names

Returns all sheet names in the workbook as a StringArray variable.

ParameterTypeRequiredDescription
OutputVariableStringYesVariable to store the list of sheet names

Excel Add Sheet

Adds a new worksheet to the workbook.

ParameterTypeRequiredDescription
SheetNameStringYesName for the new sheet

Excel Delete Sheet

Permanently deletes a worksheet. Cannot be undone.

ParameterTypeRequiredDescription
SheetNameStringYesName of the sheet to delete

Excel Rename Sheet

Renames an existing worksheet.

ParameterTypeRequiredDescription
OldNameStringYesCurrent sheet name
NewNameStringYesNew sheet name

Excel Save Workbook

Saves the workbook explicitly mid-container. Useful for checkpointing long operations.

ParameterTypeRequiredDescription
SavePathStringNoSave-as path (saves in-place if omitted)

Excel Set Formula

Writes a formula string into a cell.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
CellStringYesCell address
FormulaStringYesExcel formula, e.g. =SUM(A1:A10)

Excel Get Formula

Reads the formula string stored in a cell.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
CellStringYesCell address
OutputVariableStringYesVariable to store the formula string

Excel Format Range

Applies visual formatting to a cell range.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
RangeStringYesA1 notation range, e.g. A1:D10
BoldBooleanNoMake text bold
ItalicBooleanNoMake text italic
FontSizeNumberNoFont size in points
FontColorString (hex)NoFont colour, e.g. #FF0000
BackgroundColorString (hex)NoCell background colour
NumberFormatStringNoNumber format string, e.g. #,##0.00

Excel Auto Filter

Applies an AutoFilter to a range. Optionally filter to show only rows matching a criterion.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
RangeStringYesRange to apply AutoFilter on
ColumnInt32No (default: 1)1-based column index to apply filter criteria on
CriteriaStringNoFilter value — leave empty to just enable the filter dropdowns

Excel Sort Range

Sorts a range by a column.

ParameterTypeRequiredDescription
SheetNameStringNoSheet name
RangeStringYesRange to sort
SortByColumnStringYesColumn letter to sort by (e.g., B)
AscendingBooleanNo (default: true)Sort direction

Excel Run Macro

Executes a named VBA macro already present in the workbook.

ParameterTypeRequiredDescription
MacroNameStringYesName of the macro to run
ArgumentsStringNoComma-separated arguments to pass to the macro
OutputVariableStringNoVariable to store the macro return value

Excel Execute VBA

Injects and executes custom VBA code at runtime — no pre-existing macro required.

ParameterTypeRequiredDescription
VBACodeStringYesVBA source code to inject into the workbook
EntryPointStringYesSubroutine or function name to call after injection
OutputVariableStringNoVariable to store the return value
MacroPolicy requiredExcel Execute VBA and Excel Run Macro require macros to be enabled. Set MacroPolicy: PreferEnable on the Excel Application Container when using these activities.
Was this helpful?