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
Modifies the name used to identify a cell in a Spreadsheet control.
Remarks:
  • Then, the names can be used in the formulas so that they are easier to understand. For example: "=PriceHT*VAT" is clearer than = "=A1*A2".
  • The names are proposed in the completion when typing formulas.
Example
// Crée une formule qui référence A1 et A2 avec des noms plus clairs
SpreadsheetAddName(TBLR_TABLEUR1, "PrixHT", "$A$1")
SpreadsheetAddName(TBLR_TABLEUR1, "TVA", "$A$2")
SpreadsheetAddFormula(TBLR_TABLEUR1, "A3", "PrixHT*TVA")
SpreadsheetModifyName(TBLR_TABLEUR1, "TVA", "TVAIntra" ,"$A$2") 
// La formule de A3 devient "PrixHT*TVAIntra"
Syntax
SpreadsheetModifyName(<Spreadsheet control> , <Cell name> [, <New name> [, <Cell> [, <Range> [, <Comment>]]]])
<Spreadsheet control>: Control name
Name of the Spreadsheet control to be used.
<Cell name>: Character string
Current name of cell to modify.
<New name>: Optional character string
New name for the cell.
Caution:
  • This parameter must not correspond to a cell name ("A1" for example) or to a function name ("SUM" for example).
  • This parameter must contain no space character.
  • If the specified name is invalid or already exists, the function SpreadsheetModifyName fails: variable ErrorOccurred is set to True and function ErrorInfo is used to find out the cause of the error.
<Cell>: Optional character string
Cell to name.
Please note: Absolute coordinates must be used to designate the cell (e.g. "$A$1").
Indeed, the coordinates are relative in a cell name. Using the notation "A1", "A2", ... can lead to circular referencing errors..
<Range>: Optional integer
Number of the worksheet where the name can be used. If this parameter is not specified or if it is set to 0, the name can be used in all the worksheets.
<Comment>: Optional character string
Comment associated with the cell name (up to 255 characters).
Remarks
The names are not case sensitive (uppercase/lowercase characters)
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