AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Hoja de cálculo
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds a calculation formula into a Spreadsheet control found in a window.
Ejemplo
//  Initialize the 1st column with numbers from 1 to 10
FOR I = 1 TO 10
PSHEET_Spreadsheet.AddData(1, I, "Row " + I)
END
 
PSHEET_Spreadsheet.AddData(1, 1, 13)
PSHEET_Spreadsheet.AddData(1, 2, 20)
PSHEET_Spreadsheet.AddFormula(1, 3, "A1+A2/2") // Displays 23
PSHEET_Spreadsheet.AddFormula("A4", "A1+A2")
PSHEET_Spreadsheet.AddData(1, 2, 33) // Displays 33 in cell A3
Sintaxis

Añadir una fórmula en una celda identificada por sus coordenadas Ocultar los detalles

<Spreadsheet control>.AddFormula(<Column> , <Row> , <Formula>)
<Spreadsheet control>: Nombre del control
Name of the Spreadsheet control to be used.
<Column>: Integro
Column number of the cell containing the formula.
<Row>: Integro
Row number of the cell containing the formula.
<Formula>: Cadena de caracteres
Formula to add. The first "=" character must not be included in the formula. For example: "A1+B2-A2"
In case of syntax error or invalid identifier, "###" is displayed in the cell and a non-fatal error is displayed.

Añadir una fórmula en una celda identificada por su nombre Ocultar los detalles

<Spreadsheet control>.AddFormula(<Cell name> , <Formula>)
<Spreadsheet control>: Nombre del control
Name of the Spreadsheet control to be used.
<Cell name>: Cadena de caracteres
Name of the cell to be used. For example: "A4".
<Formula>: Cadena de caracteres
Formula to add. The first "=" character must not be included in the formula. For example: "A1+B2-A2"
In case of syntax error or invalid identifier, "###" is displayed in the cell and a non-fatal error is displayed.
Observaciones
  • If the cell (Column, Row) does not exist, the cell is created.
  • If the cell (Column, Row) already exists, the content is deleted. It is replaced with the <Formula> formula.
  • This function can only be used on a Spreadsheet control found in a window.
  • The cells can be renamed (<Spreadsheet>.AddName). You have the ability to use the name of a cell in the formula.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local