ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Spreadsheet functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Finds and replaces a value in a Spreadsheet control.
Remark: This operation can be canceled by the user via Ctrl + Z.
Example
// Replace VAT by Value A.T
nRepl is int = SpreadsheetReplace(PSHEET_MySpreadsheet, "VAT" , "Value A.T.")
IF nRepl = 0 THEN
Info("Not found")
ELSE
Info("[%nRepl%] elements have been replaced.")
END
Syntax
<Result> = SpreadsheetReplace(<Spreadsheet control> , <Sought 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.
<Sought 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:
psheetSearchWithCaseSearch while taking the case into account.
psheetSearchContain"Contains" search.
psheetSearchInFormulaSearch in the formulas only.
psheetSearchExact"Exact" search.
psheetSearchCurrentWorksheetSearch in the current worksheet.
psheetSearchNoCaseSearch ignoring the case.
psheetSearchAnyWorksheetSearch in all worksheets of workbook.

By default, the search is performed according to the following combination of constants: psheetSearchWithCase + psheetSearchCurrentWorksheet + psheetSearchExact
Component: wd290obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help