Class InMemoryRange
- Namespace
- OfficeOpenXml.FormulaParsing.Ranges
- Assembly
- EPPlus.dll
EPPlus implementation of a range that keeps its data in memory
public class InMemoryRange : IRangeInfo, IAddressInfo, IEnumerator<ICellInfo>, IEnumerator, IDisposable, IEnumerable<ICellInfo>, IEnumerable
- Inheritance
-
InMemoryRange
- Implements
- Inherited Members
Constructors
InMemoryRange(IRangeInfo)
Constructor
public InMemoryRange(IRangeInfo ri)
Parameters
ri
IRangeInfoAnother IRangeInfo used as clone for this range. The address of the supplied range will not be copied.
InMemoryRange(FormulaRangeAddress, RangeDefinition)
The constructor
public InMemoryRange(FormulaRangeAddress address, RangeDefinition rangeDef)
Parameters
address
FormulaRangeAddressThe worksheet address that should be used for this range. Will be used for implicit intersection.
rangeDef
RangeDefinitionDefines the size of the range
InMemoryRange(RangeDefinition)
The constructor
public InMemoryRange(RangeDefinition rangeDef)
Parameters
rangeDef
RangeDefinitionDefines the size of the range
InMemoryRange(List<List<object>>)
Constructor
public InMemoryRange(List<List<object>> range)
Parameters
InMemoryRange(int, short)
Constructor
public InMemoryRange(int rows, short cols)
Parameters
Properties
Address
The address of the inmemory range.
public FormulaRangeAddress Address { get; }
Property Value
Current
Current
public ICellInfo Current { get; }
Property Value
Dimension
The address of the range
public FormulaRangeAddress Dimension { get; }
Property Value
Empty
An empty range
public static InMemoryRange Empty { get; }
Property Value
IsEmpty
If the range has no cells.
public bool IsEmpty { get; }
Property Value
IsInMemoryRange
If the range is an inmemory range. Allways true.
public bool IsInMemoryRange { get; }
Property Value
IsMulti
If the range is more than one cell.
public bool IsMulti { get; }
Property Value
IsRef
The in-memory range is never a reference error. Allways false.
public bool IsRef { get; }
Property Value
Size
The size of the range.
public RangeDefinition Size { get; }
Property Value
Worksheet
The worksheet.
public ExcelWorksheet Worksheet { get; }
Property Value
Methods
Dispose()
Dispose
public void Dispose()
GetCell(int, int)
Get cell
public ICellInfo GetCell(int row, int col)
Parameters
Returns
GetEnumerator()
Get enumerator
public IEnumerator<ICellInfo> GetEnumerator()
Returns
GetNCells()
Get the number of cells in the range
public int GetNCells()
Returns
- int
The number of cells in range.
GetOffset(int, int)
Returns the value with the offset from the top-left cell.
public object GetOffset(int rowOffset, int colOffset)
Parameters
rowOffset
intThe row offset from the top-left cell.
colOffset
intThe column offset from the top-left cell.
Returns
- object
The value of the cell
GetOffset(int, int, int, int)
Returns the value with the offset from the top-left cell.
public IRangeInfo GetOffset(int rowOffsetStart, int colOffsetStart, int rowOffsetEnd, int colOffsetEnd)
Parameters
rowOffsetStart
intThe starting row offset from the top-left cell.
colOffsetStart
intThe ending column offset from the top-left cell
rowOffsetEnd
intThe ending row offset from the top-left cell.
colOffsetEnd
intThe starting column offset from the top-left cell.
Returns
- IRangeInfo
The value of the cell
GetValue(int, int)
Gets the value of a cell.
public object GetValue(int row, int col)
Parameters
Returns
IsHidden(int, int)
If the cell's row is hidden.
public bool IsHidden(int rowOffset, int colOffset)
Parameters
Returns
MoveNext()
Move next
public bool MoveNext()
Returns
Reset()
Reset
public void Reset()
SetCell(int, int, ICellInfo)
Sets the ICellInfo for a cell directly
public void SetCell(int row, int col, ICellInfo cell)
Parameters
SetValue(int, int, object)
Sets the value for a cell.
public void SetValue(int row, int col, object val)