SpreadJS 13
SpreadJS Documentation / Sample Code / Sample Code for Cells / Setting the Active Cell at a Specific Location
In This Topic
    Setting the Active Cell at a Specific Location
    In This Topic

    You can specify the location of the active cell.

    Active cell

    Using Code

    This example sets the location of the active cell.

    JavaScript
    Copy Code
    $("#button1").click(function ()
    {
       // Set cell (3,3) to active
       sheet.setActiveCell(3, 3);
        
       // Display the active cell on top left
       sheet.showCell(3, 3,
        GC.Spread.Sheets.VerticalPosition.top,
        GC.Spread.Sheets.HorizontalPosition.left);
    });