spreadsheetGetColumnWidth

Returns the width of a column in the active sheet of a spreadsheet workbook, in character widths (the same units setColumnWidth uses). Returns 0 when the column has no explicit width set. Columns are 1-based. The fluent member form is getColumnWidth(column).

spreadsheetGetColumnWidth(spreadsheetObj, column) → returns numeric

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

spreadsheetObj any
Required

The spreadsheet workbook object.

column numeric
Required

1-based column index (1 = A).

Compatibility

RustCFML:

Not supported on wasm32.

Examples
Sample code invoking the spreadsheetGetColumnWidth function

Set a width, then read it back.

wb = Spreadsheet("xlsx");
spreadsheetSetColumnWidth(wb, 2, 30);
writeDump(spreadsheetGetColumnWidth(wb, 2));

Expected Result: 30

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub