SpreadJS Documentation
setArray Method
GC.Spread.Sheets Namespace > Worksheet type : setArray Method
The row index.
The column index.
The array from which to set values.
If true, set formulas; otherwise, set values.
Sets the values in the specified two-dimensional array of objects into the specified range of cells on this sheet.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: any
value = instance.setArray(row, column, array, setFormula);
function setArray( 
   row : number,
   column : number,
   array : Array,
   setFormula : boolean
) : any;

Parameters

row
The row index.
column
The column index.
array
The array from which to set values.
setFormula
If true, set formulas; otherwise, set values.
Example
This example uses the setArray method.
//set value
var array = [[1,2,3],[4,5],[6,7,8,9]];
activeSheet.setArray(1, 2, array);
//set formula
var array = [["=1+1","=2+2","=3+3"],["=4+4","=5+5"],["=6+6","=7+7","=8+8","=9+9"]];
activeSheet.setArray(1, 2, array, true);
//get value
var newArray = activeSheet.getArray(1, 2, 3, 4);
//getformula
var newArray = activeSheet.getArray(1, 2, 3, 4, true);
//alert(newArray[0]);
See Also

Reference

Worksheet type