Class ExcelNamedRange
A named range.
Implements
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public sealed class ExcelNamedRange : ExcelRangeBase, IEnumerable<ExcelRangeBase>, IEnumerable, IEnumerator<ExcelRangeBase>, IEnumerator, IDisposable
Fields
ValidateCellAddressInFormulas
Set to true to validate and update formulas with cell references.
Declaration
public static bool ValidateCellAddressInFormulas
Field Value
| Type | Description |
|---|---|
| bool |
Properties
IsNameHidden
Is the name hidden
Declaration
public bool IsNameHidden { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LocalSheetId
Is the named range local for the sheet
Declaration
public int LocalSheetId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Name of the range
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
NameComment
A comment for the Name
Declaration
public string NameComment { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
BeforeChangeAddress(string)
Method for actions that must be taken before address is changed
Declaration
protected override void BeforeChangeAddress(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Overrides
ChangeAddress(string)
On change address handler
Declaration
protected override void ChangeAddress(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Overrides
Equals(object)
Returns true if the name is equal to the obj
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with |
Returns
| Type | Description |
|---|---|
| bool | true if equal |
Overrides
GetFormula()
Get a formula for this name.
Declaration
public string GetFormula()
Returns
| Type | Description |
|---|---|
| string |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
GetValue()
Get a value for this name.
Declaration
public object GetValue()
Returns
| Type | Description |
|---|---|
| object |
SetFormula(string)
Set a formula for this name. Will remove exsisting range and value.
Declaration
public void SetFormula(string formula)
Parameters
| Type | Name | Description |
|---|---|---|
| string | formula | The formula for this name. |
SetRange(ExcelRangeBase, bool)
Set a range for this name. Will remove exsisting formula and value.
Declaration
public void SetRange(ExcelRangeBase range, bool allowRelativeAddress = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelRangeBase | range | |
| bool | allowRelativeAddress |
SetValue(object)
Set a value for this name. Will remove exsisting range and formula.
Declaration
public void SetValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value |
ToString()
Returns a string representation of the object
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The name of the range |