'Declaration Public Sub SetColumnFormula( _ ByVal formula As Formula, _ ByVal overwriteExistingValues As Boolean _ )
public void SetColumnFormula( Formula formula, bool overwriteExistingValues )
Exception | Description |
---|---|
System.ArgumentException | |
System.InvalidOperationException | If column was removed from the table. |
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.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2