Finds the first loaded classic XLS text cell that contains the requested text
Syntaxe
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;
Remarques
FindText parcourt les cellules existantes de la feuille par ordre ligne-major et renvoie les coordonnées publiques ligne/colonne basées sur 1 de la première correspondance
The two-parameter overload is case-insensitive. Pass True for MatchCase quand la recherche doit respecter exactement la casse d'origine. Les cellules à formule et les cellules non textuelles sont ignorées
When no match is found, the method returns False and sets both coordinates to zero
Exemple
if Workbook.Sheets[1].FindText('[CONTACT]', Row, Col) then
Workbook.Sheets[1].Cells[Row, Col].Value := 'John Smith';
See Also