Skip to main content

Clear range

Clear the contents, the formats or both of a range, or of the current selection; the cells stay where they are (Delete cells moves the cells around them).

Command in the Excel toolkit · id ooa.excel/clear_range · 4 inputs, 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
RangeStringNoCell or range to clear; when empty, the range chosen by select_range or the cell chosen by go_to_cell.
ClearStringNocontentscontents empties the cells and keeps their formats (as the Delete key does); formats resets the formats and keeps the contents; all does both.
SheetStringNoSheet name; active sheet when empty.
SessionStringNoexcelWorkbook session.

Outputs​

OutputTypeWhat it is
countNumberNumber of cells that held contents or formats and were cleared.