clearRange

clears a range of cells (either selected cells or specified in the parameter)

void clearRange( [string rangeStr,object type,string page] );
rangeStrstringoptional, the range of cells
typeobjectoptional, defines clearing options (see details)
pagestringoptional, the name of the sheet

Example

$$("ssheet").clearRange("B2:D2", {values:true, styles:true}, "Sheet1");

Details

If the rangeStr parameter isn't set, the method will clear the selected range, if there is any.

The type object can have two attributes:

  • values - (boolean) true by default, to clear cell values
  • styles - (boolean) true by default, to clear cell styles
  • conditions - (boolean) true by default, to clear conditional formatting
  • editors - (boolean) true by default, to clear editors values
  • comments - (boolean) true by default, to clear comments
  • filters - (boolean) true by default, to clear filters
Back to top
If you have not checked yet, be sure to visit site of our main product Webix ui widget library and page of spreadsheet javascript library product.