spreadsheetSetCellRangeValue

Sets the same value on every cell in a rectangular range of the active sheet of a spreadsheet workbook. All coordinates are 1-based. The fluent member form is setCellRangeValue(value, startRow, startColumn, endRow, endColumn).

spreadsheetSetCellRangeValue(spreadsheetObj, value, startRow, startColumn, endRow, endColumn) → returns any

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

Argument Reference

spreadsheetObj any
Required

The spreadsheet workbook object.

value any
Required

The value to write to each cell in the range.

startRow numeric
Required

1-based starting row of the range.

startColumn numeric
Required

1-based starting column of the range.

endRow numeric
Required

1-based ending row of the range.

endColumn numeric
Required

1-based ending column of the range.

Compatibility

RustCFML:

Not supported on wasm32.

Examples
Sample code invoking the spreadsheetSetCellRangeValue function

Fill the 2x2 range from A1 to B2 with a border colour value.

wb = Spreadsheet("xlsx");
spreadsheetSetCellRangeValue(wb, "pending", 1, 1, 2, 2);
writeDump(spreadsheetGetCellValue(wb, 2, 2));

Expected Result: pending

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

Fork me on GitHub