SpreadJS Documentation
addSelection Method
The row index of the first cell to add.
The column index of the first cell to add.
The number of rows to add.
The number of columns to add.
Adds a cell or cells to the selection.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: any
value = instance.addSelection(row, column, rowCount, columnCount);
function addSelection( 
   row : number,
   column : number,
   rowCount : number,
   columnCount : number
) : any;

Parameters

row
The row index of the first cell to add.
column
The column index of the first cell to add.
rowCount
The number of rows to add.
columnCount
The number of columns to add.
Example
This example adds a selection and uses the selection in a rule.
sheet.setValue(0,0, 1,3);
sheet.setValue(1,0, 50,3);
sheet.setValue(2,0, 100,3);
sheet.setValue(3,0, 2,3);
sheet.setValue(4,0, 60,3);
sheet.setValue(5,0, 90,3);
sheet.setValue(6,0, 3,3);
sheet.setValue(7,0, 40,3);
sheet.setValue(8,0, 70,3);
sheet.setValue(9,0, 5,3);
sheet.setValue(10,0, 35,3);
sheet.addSelection(0,0,11,1);
sheet.getConditionalFormats().add3ScaleRule(1, 10, "red", 0, 50, "blue",2, 100, "yellow", sheet.getSelections());
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.