Table of Contents

Class ExcelRange

Namespace
OfficeOpenXml
Assembly
EPPlus.dll

A range of cells.

public class ExcelRange : ExcelRangeBase, IEnumerable<ExcelRangeBase>, IEnumerable, IEnumerator<ExcelRangeBase>, IDisposable, IEnumerator
Inheritance
ExcelRange
Implements
Inherited Members
Extension Methods

Properties

this[int, int]

Access a single cell

public ExcelRange this[int Row, int Col] { get; }

Parameters

Row int

The row

Col int

The column

Property Value

ExcelRange

A range object

this[int, int, int, int]

Access a range of cells

public ExcelRange this[int FromRow, int FromCol, int ToRow, int ToCol] { get; }

Parameters

FromRow int

Start row

FromCol int

Start column

ToRow int

End Row

ToCol int

End Column

Property Value

ExcelRange

this[string]

Access the range using an address

public ExcelRange this[string Address] { get; }

Parameters

Address string

The address

Property Value

ExcelRange

A range object

Methods

SetFormula(string, bool)

Set the formula for the range.

public void SetFormula(string formula, bool asSharedFormula = true)

Parameters

formula string

The formula for the range.

asSharedFormula bool

If the formula should be created as a shared formula. If false each cell will be set individually. This can be useful if the formula returns a dynamic array result.