Class RangeInfo
EPPlus implementation of the IRangeInfo interface
Inheritance
System.Object
RangeInfo
Implements
System.Collections.Generic.IEnumerator<ICellInfo>
System.Collections.IEnumerator
System.IDisposable
System.Collections.Generic.IEnumerable<ICellInfo>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.FormulaParsing.Ranges
Assembly: EPPlus.dll
Syntax
public class RangeInfo : IRangeInfo, IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable
Constructors
RangeInfo(ExcelWorksheet, ExcelAddressBase, ParsingContext)
Constructor
Declaration
public RangeInfo(ExcelWorksheet ws, ExcelAddressBase address, ParsingContext ctx = null)
Parameters
Type | Name | Description |
---|---|---|
ExcelWorksheet | ws | |
ExcelAddressBase | address | |
ParsingContext | ctx | Parsing context |
RangeInfo(ExcelWorksheet, ParsingContext)
Declaration
public RangeInfo(ExcelWorksheet ws, ParsingContext ctx)
Parameters
Type | Name | Description |
---|---|---|
ExcelWorksheet | ws | The worksheet |
ParsingContext | ctx | Parsing context |
RangeInfo(ExcelWorksheet, Int32, Int32, Int32, Int32, ParsingContext, Int32)
Constructor
Declaration
public RangeInfo(ExcelWorksheet ws, int fromRow, int fromCol, int toRow, int toCol, ParsingContext ctx, int extRef = -1)
Parameters
Type | Name | Description |
---|---|---|
ExcelWorksheet | ws | The worksheet |
System.Int32 | fromRow | |
System.Int32 | fromCol | |
System.Int32 | toRow | |
System.Int32 | toCol | |
ParsingContext | ctx | Parsing context |
System.Int32 | extRef | External reference id |
RangeInfo(FormulaRangeAddress)
Constructor
Declaration
public RangeInfo(FormulaRangeAddress address)
Parameters
Type | Name | Description |
---|---|---|
FormulaRangeAddress | address |
Properties
Address
Address of the range
Declaration
public FormulaRangeAddress Address { get; }
Property Value
Type | Description |
---|---|
FormulaRangeAddress |
Current
Current cell
Declaration
public ICellInfo Current { get; }
Property Value
Type | Description |
---|---|
ICellInfo |
Dimension
Declaration
public FormulaRangeAddress Dimension { get; }
Property Value
Type | Description |
---|---|
FormulaRangeAddress |
IsEmpty
Returns true if the range is empty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInMemoryRange
Returns true if the range is an InMemoryRange
Declaration
public bool IsInMemoryRange { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMulti
Returns true if more than one cell
Declaration
public bool IsMulti { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsRef
Returns true if the range represents a reference
Declaration
public bool IsRef { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Size
Size of the range
Declaration
public RangeDefinition Size { get; }
Property Value
Type | Description |
---|---|
RangeDefinition |
Worksheet
The worksheet
Declaration
public ExcelWorksheet Worksheet { get; }
Property Value
Type | Description |
---|---|
ExcelWorksheet |
Methods
Dispose()
Runs at dispose of this instance
Declaration
public void Dispose()
GetEnumerator()
Returns enumerator for cells
Declaration
public IEnumerator<ICellInfo> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ICellInfo> |
GetNCells()
The total number of cells (including empty) of the range
Declaration
public int GetNCells()
Returns
Type | Description |
---|---|
System.Int32 |
GetOffset(Int32, Int32)
Return value by offset
Declaration
public object GetOffset(int rowOffset, int colOffset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowOffset | |
System.Int32 | colOffset |
Returns
Type | Description |
---|---|
System.Object |
GetOffset(Int32, Int32, Int32, Int32)
Returns a subrange
Declaration
public IRangeInfo GetOffset(int rowOffsetStart, int colOffsetStart, int rowOffsetEnd, int colOffsetEnd)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowOffsetStart | |
System.Int32 | colOffsetStart | |
System.Int32 | rowOffsetEnd | |
System.Int32 | colOffsetEnd |
Returns
Type | Description |
---|---|
IRangeInfo |
GetValue(Int32, Int32)
Returns the cell value by 0-based index
Declaration
public object GetValue(int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | 0-based row index |
System.Int32 | col | 0-based col index |
Returns
Type | Description |
---|---|
System.Object | Cell value |
IsHidden(Int32, Int32)
Declaration
public bool IsHidden(int rowOffset, int colOffset)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowOffset | |
System.Int32 | colOffset |
Returns
Type | Description |
---|---|
System.Boolean |
MoveNext()
Moves to next cell
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System.Boolean |
NextCell()
Moves to next cell
Declaration
public bool NextCell()
Returns
Type | Description |
---|---|
System.Boolean |
Reset()
Declaration
public void Reset()
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns enumerator for cells
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
IEnumerator.Current
IEnumerator.Current
Declaration
object IEnumerator.Current { get; }
Returns
Type | Description |
---|---|
System.Object |
Implements
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable