Version

SetColumnFormula(Formula,Boolean) Method

Sets the formula to use in the data cells in the column.
Syntax
public void SetColumnFormula( 
   Formula formula,
   bool overwriteExistingValues
)

Parameters

formula
The formula for the data cells of the column or null to remove the current column formula.
overwriteExistingValues
True to overwrite the existing cells values and apply the formula to all data cells in the column. False to only apply the formula to the cells with no value set.
Exceptions
ExceptionDescription
System.ArgumentExceptionIf column was removed from the table.formula is already applied to something else, such as a cell or table column.
System.InvalidOperationExceptionIf column was removed from the table.
Remarks

If any relative cell or region references are in the specified formula, it will be assumed that the actual formula is being applied to the first data cell in the column. When the formula is applied to other cells in the column, the relative references will be offset by the appropriate amount.

When the column formula is set and the table is resized to give it more rows, the new cells in the column will have the column formula applied to them.

If there was a different column formula applied previously and it was applied to any of the cells in the column, setting it to a different formula will overwrite the formulas on those cells, regardless of the value of overwriteExistingValues.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also