~4 min11 / 16

Excel Automation

Genzbots provides 18 Excel activities covering every common operation — read/write ranges, cell formulas, formatting, sorting, filtering, sheet management, macros, and VBA execution. All Excel activities run inside an Excel Application Container that manages the COM session.

Excel Application Container

The container opens (or creates) a workbook and scopes all child Excel activities to it.

ParameterDescription
File PathPath to the .xlsx / .xls / .xlsm file
VisibleShow the Excel window during automation (useful for debugging)
Create If MissingCreate the file if it does not exist
PasswordOpen password-protected workbooks
Save On CompleteAuto-save when the container block finishes
One container per workflowOpen the workbook once per workflow — do not put the container inside a loop. All read/write activities inside the container share the same COM instance.

Read & Write

ActivityWhat it does
Excel Read RangeReads a cell range (e.g., A1:D100) into a DataTable. Leave range empty to read the used range.
Excel Write RangeWrites a DataTable to a starting cell (e.g., A1)
Excel Get Cell ValueReads a single cell into a variable
Excel Set Cell ValueWrites a value to a single cell
Excel Get FormulaReturns the formula string from a cell (e.g., =SUM(A1:A10))
Excel Set FormulaSets a formula in a cell
Excel Save WorkbookSaves without closing the container

Sheets

ActivityWhat it does
Excel Get Sheet NamesReturns all sheet names as a StringArray
Excel Add SheetInserts a new sheet with a given name
Excel Delete SheetRemoves a sheet by name
Excel Rename SheetRenames an existing sheet

Formatting, Filtering & Sorting

ActivityWhat it does
Excel Format RangeApply bold, italic, font size, background colour, borders to a range
Excel Auto FilterApply or clear AutoFilter on a range
Excel Sort RangeSort a range by one or more columns (ascending/descending)

Macros & VBA

ActivityWhat it does
Excel Run MacroRun an existing macro by name (workbook must be .xlsm)
Excel Add MacroInsert VBA code into the workbook programmatically
Excel Execute VBAExecute arbitrary VBA code as a string
Was this helpful?