In french: TableurModifieNom
Modifies the name used to identify a cell in a Spreadsheet control.
- Then, the names can be used in the formulas so that they are easier to understand. For example: "=PriceBT*VAT" is clearer than = "=A1*A2".
- The names are proposed in the completion when typing formulas.
// Creates a formula that references A1 and A2 with clearer names
SpreadsheetAddName(PSHEET_Spreadsheet1, "PriceBT", "$A$1")
SpreadsheetAddName(PSHEET_Spreadsheet1, "VAT", "$A$2")
SpreadsheetAddFormula(PSHEET_Spreadsheet1, "A3", "PriceBT*VAT")
SpreadsheetModifyName(PSHEET_Spreadsheet1, "VAT", "IntraVAT" ,"$A$2")
// The formula of A3 becomes "PriceBT*IntraVAT"
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.
- 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.
- SpreadsheetModifyName fails if the specified name is invalid or if it already exists: the ErrorOccurred variable is set to True and ErrorInfo returns the details of the error.
<Cell>: Optional character string
Cell to name.
Caution: Absolute coordinates must be used to identify the cell (for example: "$A$1").
Indeed, the coordinates are relative in a cell name. Using the notation "A1", "A2", ... may trigger errors of circular references.
<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).
The names are not case sensitive (uppercase/lowercase characters)
This page is also available for…