'Declaration Public Sub ApplyCellFormula( _ ByVal columnIndex As System.Integer, _ ByVal formula As System.String, _ Optional ByVal cellReferenceMode As System.Nullable(Of CellReferenceMode) _ )
public void ApplyCellFormula( System.int columnIndex, System.string formula, System.Nullable<CellReferenceMode> cellReferenceMode )
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | columnIndex is less than zero or greater than or equal to the number of columns in the worksheet. |
System.ArgumentNullException | formula is null or empty. |
FormulaParseException | formula is not a valid formula. |
System.InvalidOperationException | The cell is part of an array formula or data table which is not confined to just the cell. |
System.ComponentModel.InvalidEnumArgumentException | cellReferenceMode is not defined in the CellReferenceMode enumeration. |
System.InvalidOperationException | If the row was removed from the worksheet. |
formula is parsed based on the CellReferenceMode of the Workbook to which the row belongs. If the row's Worksheet has been removed from its parent collection, the A1 CellReferenceMode will be used to parse the formula.
Target Platforms: Windows 8.1, 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
View on GitHub