Finds the first loaded classic XLS text cell that contains the requested text
Sintassi
function FindText(SearchText: WideString; out Row: Integer; out Col: Integer): Boolean; overload;
function FindText(SearchText: WideString; out Row: Integer; out Col: Integer; MatchCase: Boolean): Boolean; overload;
Osservazioni
FindText scans existing worksheet cells in row-major order e returns 1-based public row e column coordinates for the first match
The two-parameter overload is case-insensitive. Pass True for MatchCase when the search must match the original casing exactly. Formula cells e non-text cells are skipped
When no match is found, the method returns False e sets both coordinates to zero
Esempio
if Workbook.Sheets[1].FindText('[CONTACT]', Row, Col) then
Workbook.Sheets[1].Cells[Row, Col].Value := 'John Smith';
Vedere Also