SetCurrentCell
It highlight the specified cell on the active sheet.
BOOL SetCurrentCell( int nRow, int nCol, BOOL bTranslate = TRUE )
True if successfully highlighted the specified cell, else return false.
EX1
void Grid_SetCurrentCell_ex1() { Worksheet wks = Project.ActiveLayer(); if ( wks ) { Grid grid; grid.Attach(wks); int nRow, nCol; BOOL bTranslate = true; int nRet = grid.GetCurrentCell(nRow, nCol, bTranslate); printf("Select cell in active worksheet is (%d, %d)\n", nRow + 1, nCol + 1); //select the right-bottom cell nRow = wks.GetNumRows() - 1; nCol = wks.GetNumCols() - 1; BOOL bRet = grid.SetCurrentCell(nRow, nCol, bTranslate); } }
origin.h