SpreadJS 14
GC.Spread.Sheets Namespace / Worksheet type / getRange Method
The range address string. For example "C1", "A:C", "A1:C3", "1:3".
The sheet area. If this parameter is not given, it defaults to viewport.
In This Topic
    getRange Method
    In This Topic
    Gets a range of cells by A1 style address(not support R1C1 style) in the specified sheet area.
    Syntax
    var instance = new GC.Spread.Sheets.Worksheet(name);
    var value; // Type: CellRange
    value = instance.getRange(address, sheetArea);
    function getRange( 
       address : string,
       sheetArea : SheetArea
    ) : CellRange;

    Parameters

    address
    The range address string. For example "C1", "A:C", "A1:C3", "1:3".
    sheetArea
    The sheet area. If this parameter is not given, it defaults to viewport.

    Return Value

    The cellRange.
    Example
    // Get a single cell, it equals to sheet.getRange(0, 0, 1, 1)
    sheet.getRange("A1")
    // Get whole columns, it equals to sheet.getRange(-1, 0, -1, 3)
    sheet.getRange("A:C")
    // Get whole rows, it equals to sheet.getRange(0, -1, 3, -1)
    sheet.getRange("1:3")
    // Get a range, it equals to sheet.getRange(0, 0, 3, 3)
    sheet.getRange("A1:C3")
    See Also

    Reference

    Worksheet type