Version

ApplyCellFormula Method

Applies a formula to the cell at the specified column index.
Syntax
public void ApplyCellFormula( 
   int columnIndex,
   string formula,
   Nullable<CellReferenceMode> cellReferenceMode
)

Parameters

columnIndex
The 0-based index of the cell within the WorksheetRow.
formula
The formula to parse and apply to the cell.
cellReferenceMode
The mode used to interpret cell references in the formula.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptioncolumnIndex is less than zero or greater than or equal to the number of columns in the worksheet.
System.ArgumentNullExceptionformula is null or empty.
FormulaParseExceptionformula 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.
Infragistics.Documents.Excel.MockClasses.InvalidEnumArgumentExceptioncellReferenceMode is not defined in the CellReferenceMode enumeration.
System.InvalidOperationExceptionIf the row was removed from the worksheet.
Remarks

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.

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