SpreadJS Documentation
Getting the Active Cell Index
SpreadJS Documentation > Sample Code > Sample Code for Cells > Getting the Active Cell Index

You can get the index of the active cell.

Using Code

This example gets the column and row index of the active cell.

JavaScript
Copy Code
$("#button1").click(function () {
    var sheet = spread.getActiveSheet();
     alert("Row index of an active cell : " + sheet.getActiveRowIndex() + "\n" +
         "Column index of an active cell: " + sheet.getActiveColumnIndex());
 });