Link Search Menu Expand Document

SSpread.GetCellFromScreenCoord Method

Explanation Gets the column and row numbers of the cells displayed at the specified screen coordinates (x, y), with the top left coordinate of the spreadsheet as the origin.
Call format GetCellFromScreenCoord(x, y)
Return value Record object with the following child objects
Constant Value Description
Number Col The column number of the cell displayed at the position of the screen ( x, y ) coordinates. -1 for gray areas .
Number Row The row number of the cell displayed at the position of the screen ( x, y ) coordinates. -1 for gray areas .
Arguments x Screen x coordinate
y Screen y coordinate
Exception None
Example of use
   var ret = GetCellFromScreenCoord(100, 100);
    print(ret.Col, ret.Row, "\n");
    
Related item GetCellPos method