ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Spreadsheet functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Seeks a value in the cells of a Spreadsheet control found in a window.
Example
sCell is string = PSHEET_NoName1.Seek("%CUSTOMERNAME%")
// Processes the result of the search
IF sCell <> "" THEN
	 // Replaces %CUSTOMERNAME% by Doe
	 PSHEET_NoName1[sCell] = "Doe"
END
// Parcours de toutes les cellules avec "TVA"
sCell is string = TBLR_SansNom1.Cherche("TVA")
WHILE  sCell <> ""
	// Remplace TVA par TBLR_SansNom1[sCell] = 20.6
	Trace(sCell)
	// Cellule suivante
	sCell = TBLR_SansNom1.Cherche("TVA", sCell)
END
Syntax
<Result> = <Spreadsheet control>.Seek(<Search value> [, <Start> [, <Options>]])
<Result>: Character string
  • Name of cell found ("A1" for example). If several cells are found, <Result> contains the name of first cell found.
  • "" (empty string) if no cell is found.
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Search value>: Type of sought value
Value to find in the cells of Spreadsheet control. This value can correspond to a number or to a character string.
<Start>: Optional character string
Name of the from which the search will be performed. This cell is excluded from the research.
Note: this parameter scrolls through all cells containing a.
If this parameter is not specified or is an empty string (""), the search starts at cell "A1".
<Options>: Optional Integer constant
Search options:
psheetSearchWithCaseCase-sensitive search.
psheetSearchContain"Contains" search.
psheetSearchInFormulaSearch only in formulas.
psheetSearchExactExact-match search.
psheetSearchCurrentWorksheetSearch in the current worksheet.
psheetSearchNoCaseCase-insensitive search.
psheetSearchAnyWorksheetSearch in all sheets of the workbook.

By default, the search is based on the following combination of constants: tblrRechAvecCasse + tblrRechFeuilleEnCours + tblrRechExact
Remarks
  • The search is performed in the following order: A1, B1, C1, ..., A2, B2, C2, ...
  • This function can only be used on a Spreadsheet control found in a window.
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help