SpreadJS Documentation
Getting the Displayed Cell Index

You can get the index of the displayed cell.

Using Code

This example gets the row and column index.

JavaScript
Copy Code
$("#button1").click(function () {
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
    var sheet = spread.getActiveSheet();

    //Acquire top row (column) index
    var topRow = sheet.getViewportTopRow(1);
    var leftCol = sheet.getViewportLeftColumn(1);

    alert("Index of top row being displayed: " + topRow + "\n" +
        "Index of first column being displayed: " + leftCol);
});

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.