public NamedReference Add( string name, string formula, CellReferenceMode cellReferenceMode, Worksheet worksheet )
Exception | Description |
---|---|
System.ArgumentNullException | name is null or empty. |
System.ArgumentException | name is longer than 255 characters. |
System.ArgumentException | name is invalid. The name must begin with a letter, underscore (_), or a backslash (\). All other characters in the name must be letters, numbers, periods, underscores (_), or backslashes (\). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers). |
System.InvalidOperationException | name is used by another named reference which also has a scope of the specified worksheet. Named reference names are compared case-insensitively. |
System.ArgumentNullException | formula is null or empty. |
System.ArgumentException | formula is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid. |
Infragistics.Documents.Excel.MockClasses.InvalidEnumArgumentException | cellReferenceMode is not defined in the CellReferenceMode enumeration. |
System.ArgumentNullException | worksheet is null. |
System.ArgumentException | worksheet does not belong to the workbook owning this collection. |
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+