Spread.Sheets Documentation
getSpans Method
GC.Spread.Sheets Namespace > Worksheet type : getSpans Method
The cell range.
The sheet area. If this parameter is not given, it defaults to viewport.
Gets the spans in the specified range in the specified sheet area.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: Array
value = instance.getSpans(range, sheetArea);
function getSpans( 
   range : Range,
   sheetArea : SheetArea
) : Array;

Parameters

range
The cell range.
sheetArea
The sheet area. If this parameter is not given, it defaults to viewport.

Return Value

An array that contains span information whose item type is GC.Spread.Sheets.Range.
Example
This example gets the cell spans.
activeSheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);

//button click event
var spans= activeSheet.getSpans();      
for(var i = 0; i < spans.length; i++){
alert(spans[i].row);
alert(spans[i].rowCount);
alert(spans[i].col);
alert(spans[i].colCount);
}
This example displays alerts.
sheet.addSpan(0,0,3,3,GC.Spread.Sheets.SheetArea.viewport);
var spans =sheet.getSpans();
for(var i=0;i<spans.length;i++) {
  alert(spans[i].row.toString() + spans[i].col.toString());
 }
See Also

Reference

Worksheet type