Get the value at the location (nRow, nCol) in the worksheet as a string
string TCell( int nRow, int nCol, int nOption = TCELL_VALUE, DWORD * pdwExtraInfo = NULL )
string at the location (nRow, nCol) in the worksheet
EX1
//Get the value at the location (nRow, nCol) in the worksheet as a string. int Datasheet_TCell_Ex1() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return -1; Worksheet wks(wp.GetName()); string strText = "Monday"; wks.SetCell(0, 0, strText); string cellText = wks.TCell(0, 0); printf("Value at (0,0) location is %s\n", cellText); return 0; }
EX2
//Get the value at the location (nRow, nCol) in the matrix as a string. void MatrixLayer_TCell_Ex1() { MatrixLayer ml = Project.ActiveLayer(); if ( !ml ) { printf("Can not access active matrixsheet"); return; } string strCellText = ml.TCell(0, 0); printf("The cell value of Cell(0, 0) is %s\n", strCellText); return; }
Datasheet::Cell, Worksheet::GetCell, Datasheet::SetCell
origin.h