spreadsheetClearCellRange

Clears the contents of every cell in a rectangular range of the active sheet of a spreadsheet workbook. All coordinates are 1-based. The fluent member form is clearCellRange(startRow, startColumn, endRow, endColumn).

spreadsheetClearCellRange(spreadsheetObj, 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.

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 spreadsheetClearCellRange function

Clear the 2x3 range from B2 to D3.

wb = Spreadsheet("xlsx");
spreadsheetSetCellRangeValue(wb, "x", 2, 2, 3, 4);
spreadsheetClearCellRange(wb, 2, 2, 3, 4);

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

Fork me on GitHub