Skip to main content

Autofit Rows and Columns

Excel·v1.11.1
ExcelFormattingWrites files

Widen columns to fit their contents. Widths are estimated from the longest value rather than measured, and rows are handed back to Excel to fit when the file opens

Inputs

NameTypeRequiredDefaultDescription
Excel Instance
excelInstance
variableRequired
Sheet Name
sheetName
stringOptionalLeave empty for the first sheet
Range
range
stringOptionalLeave empty for everything on the sheet
Fit
target
enumOptionalcolumns
columnsrowsboth
Minimum Width
minWidth
numberOptional6
Shown when target = columns / both
Maximum Width
maxWidth
numberOptional80
Shown when target = columns / both

Compatibility

WindowsLinuxAttendedUnattended

Related activities