PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Finds and replaces a value in a Spreadsheet control.
Note: 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 Spreadsheet control to use.
<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 while 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 : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment