Version

SetFormula(String,CellReferenceMode,CultureInfo) Method

Sets the formula for a named reference.
Syntax
'Declaration
 
Public Overloads Sub SetFormula( _
   ByVal formula As String, _
   ByVal cellReferenceMode As CellReferenceMode, _
   ByVal culture As CultureInfo _
) 
public void SetFormula( 
   string formula,
   CellReferenceMode cellReferenceMode,
   CultureInfo culture
)

Parameters

formula
The string containing the formula value.
cellReferenceMode
The mode used to interpret cell references in the formula.
culture
The culture used to parse the formula.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionformula is null or empty.
System.ComponentModel.InvalidEnumArgumentExceptioncellReferenceMode is not defined in the CellReferenceMode enumeration.
System.ArgumentExceptionformula is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.
Requirements

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

See Also