Finds the first loaded classic XLS text cell that contains the requested text
Syntaks
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;
Bemærkninger
FindText gennemgår eksisterende regnearksceller i rækkevis rækkefølge og returnerer 1-baserede række- og kolonnekoordinater for det første match
The two-parameter overload is case-insensitive. Pass True for MatchCase når søgningen skal matche den oprindelige versalering præcist. Formelceller og ikke-tekstceller springes over
When no match is found, the method returns False and sets both coordinates to zero
Eksempel
if Workbook.Sheets[1].FindText('[CONTACT]', Row, Col) then
Workbook.Sheets[1].Cells[Row, Col].Value := 'John Smith';
See Also