SpreadsheetDocument.FindText
Syntax:
Parameters:
<Line> (required)
Required text.
<Beginning> (optional)
The area after which the search is executed. If this parameter is not specified, search will be performed from the beginning of the spreadsheet document.
<Where> (optional)
The area where the search is executed. If this parameter is not specified, search is performed in all cells of the spreadsheet document.
<SearchByRows> (optional)
Defines cells tab order by search.
True - search in current row, then go to the next, etc., in the general search direction, False - search in current column, then go to the next, etc., in the general search direction.
Default value: True.
<EntireCell> (optional)
True - search only those cells where whole cell text is the same as required text, False - search part of cell text.
Default value: False.
<SearchForward> (optional)
You can use it to define search direction: True - search forward; False - search backward.
Default value: True.
<IgnoreCase> (optional)
True - don't match case, False - match case by search.
Default value: False.
Returned value:
The area that contains a searched text. If the text is not found, Undefined value is returned.
Description:
Availability:
Example:
// To look how this method works, add the following lines // to the end of the example for the StartRowGroup() method Department = "Total2"; Area=Spreadsheet.FindText(Department); If TypeOf(Area)=Type("Undefined") Then Message("Value not found!"); Else Pos = Find(Area.Name,"C"); Name= Left(Area.Name,Pos)+ String(Number(Right(Area.Name,StrLen(Area.Name)-Pos))+1); Message("Total on department 2 = "+Spreadsheet.Area(Name).Text); EndIf; |