Skip to content

Autofit Rows/Columns Activity

The Autofit Rows/Columns activity enables the automatic adjustment of row heights and column widths to accommodate the size of the data entries within an Excel worksheet. This function ensures that all content is fully visible and professionally formatted without manual resizing.

Field Description Requirement
Excel name The reference name of the Excel file that has been previously opened or created. Required
Sheet name The name of the specific worksheet to target. If omitted, the activity defaults to the first sheet. Optional
Range The specific row, column, or cell range to be adjusted (e.g., A1:D1 for columns A through D). Optional

Action Types & Examples

Range Specification

  • Format: string
  • Example Result: "A1:D1"

Implementation Examples

Field Setup - Excel name: ${newExcel} - Sheet name: Sheet1 - Range: A1:D1

Technical Notes

Unlike the standard Excel component, MS Excel does not expose separate Rows and Columns fields or a Sheet index selector — a single Range targets both rows and columns by referencing the corresponding cells, and the sheet is always selected by name. If Range is left blank, the autofit action applies to the entire used range of the specified worksheet.