Gets or sets the table cell's formula. For each table cell a formula can be defined which is used to calculate the cell's text. The formula can contain references to other table cells in the same table. When the text of a referenced cell changes, the cell which references it is automatically updated. The Supported Formula Functions section lists all supported formulas. Cell references can be specified either with the A1 or with the R1C1 notation. The A1 notation specifies a table cell with a column letter and a row number, for example B3 refers to the table cell in the third row and the second column. The R1C1 notation addresses a table cell with a row number and a column number, for example R3C2 refers to the same table cell in the third row and the second column. Relative addresses can be expressed with square brackets, for example R[-3]C[-2]. The numbers inside the square brackets show how many rows or columns the cell is relative to itself. Negative row numbers mean that the referenced cell is above the cell containing the formula. Negative column numbers mean that the referenced cell is to the left of the cell containing the formula. To switch the reference style the FormulaReferenceStyle property can be used. The formula's result is formatted according to the format specified with the TableCellFormat.NumberFormat property.

Introduced: X16.

Syntax

public string Formula { get; set; }
Public Property Formula() As String