ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
Finds and replaces a value in a Spreadsheet control.
Note: This operation can be cancelled by the user using the Ctrl + Z key combination..
Example
// Remplacement de TVA par Taxe V.A
nRempl is int = SpreadsheetReplace(TBLR_MonTableur, "TVA" , "Taxe V.A.")
IF nRempl = 0 THEN
	Info("Pas trouvé")
ELSE
	Info("[%nRempl%] éléments ont été remplacés.")
END
Syntax
<Result> = SpreadsheetReplace(<Spreadsheet control> , <Search value> , <ReplaceBy> [, <Cell> [, <Options>]])
<Result>: Integer
  • Number of replacements done.
  • 0 if no replacement was performed.
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Search value>: Real or character string
Value to find in the Spreadsheet control in order to be replaced.
<ReplaceBy>: Real or character string
New value that will replace the sought value.
<Cell>: Optional character string
Name of cell to modify.
  • If this parameter is specified, only the corresponding values in this cell will be replaced.
  • If this parameter is not specified, all the corresponding values (in the current worksheet or in all worksheets, according to the <Options> parameters) will be modified.
<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
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help