Class RangeInfo
EPPlus implementation of the IRange
Inheritance
Implements
Inherited Members
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 |
---|---|---|
Excel |
ws | |
Excel |
address | |
Parsing |
ctx | Parsing context |
RangeInfo(ExcelWorksheet, ParsingContext)
Declaration
public RangeInfo(ExcelWorksheet ws, ParsingContext ctx)
Parameters
Type | Name | Description |
---|---|---|
Excel |
ws | The worksheet |
Parsing |
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 |
---|---|---|
Excel |
ws | The worksheet |
System. |
fromRow | |
System. |
fromCol | |
System. |
toRow | |
System. |
toCol | |
Parsing |
ctx | Parsing context |
System. |
extRef | External reference id |
RangeInfo(FormulaRangeAddress)
Constructor
Declaration
public RangeInfo(FormulaRangeAddress address)
Parameters
Type | Name | Description |
---|---|---|
Formula |
address |
Properties
Address
The first address of the range
Declaration
public FormulaRangeAddress Address { get; }
Property Value
Type | Description |
---|---|
Formula |
Addresses
If the address contains more the one address (i.e A1:A2,A4), this array contains all addresses
Declaration
public FormulaRangeAddress[] Addresses { get; }
Property Value
Type | Description |
---|---|
Formula |
Current
Current cell
Declaration
public ICellInfo Current { get; }
Property Value
Type | Description |
---|---|
ICell |
Dimension
Dimension
Declaration
public FormulaRangeAddress Dimension { get; }
Property Value
Type | Description |
---|---|
Formula |
IsEmpty
Returns true if the range is empty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System. |
IsInMemoryRange
Returns true if the range is an In
Declaration
public bool IsInMemoryRange { get; }
Property Value
Type | Description |
---|---|
System. |
IsMulti
Returns true if more than one cell
Declaration
public bool IsMulti { get; }
Property Value
Type | Description |
---|---|
System. |
IsRef
Returns true if the range represents an invalid reference
Declaration
public bool IsRef { get; }
Property Value
Type | Description |
---|---|
System. |
Size
Size of the range
Declaration
public RangeDefinition Size { get; }
Property Value
Type | Description |
---|---|
Range |
Worksheet
The worksheet
Declaration
public ExcelWorksheet Worksheet { get; }
Property Value
Type | Description |
---|---|
Excel |
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. |
GetNCells()
The total number of cells (including empty) of the range
Declaration
public int GetNCells()
Returns
Type | Description |
---|---|
System. |
GetOffset(Int32, Int32)
Return value by offset
Declaration
public object GetOffset(int rowOffset, int colOffset)
Parameters
Type | Name | Description |
---|---|---|
System. |
rowOffset | |
System. |
colOffset |
Returns
Type | Description |
---|---|
System. |
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. |
rowOffsetStart | |
System. |
colOffsetStart | |
System. |
rowOffsetEnd | |
System. |
colOffsetEnd |
Returns
Type | Description |
---|---|
IRange |
GetValue(Int32, Int32)
Returns the cell value by 0-based index
Declaration
public object GetValue(int row, int col)
Parameters
Type | Name | Description |
---|---|---|
System. |
row | 0-based row index |
System. |
col | 0-based col index |
Returns
Type | Description |
---|---|
System. |
Cell value |
IsHidden(Int32, Int32)
Is hidden
Declaration
public bool IsHidden(int rowOffset, int colOffset)
Parameters
Type | Name | Description |
---|---|---|
System. |
rowOffset | |
System. |
colOffset |
Returns
Type | Description |
---|---|
System. |
MoveNext()
Moves to next cell
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System. |
NextCell()
Moves to next cell
Declaration
public bool NextCell()
Returns
Type | Description |
---|---|
System. |
Reset()
Declaration
public void Reset()
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns enumerator for cells
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System. |
IEnumerator.Current
IEnumerator.Current
Declaration
object IEnumerator.Current { get; }
Returns
Type | Description |
---|---|
System. |