Class ExcelRange
A range of cells.
Implements
System.Collections.Generic.IEnumerable<ExcelRangeBase>
    System.Collections.IEnumerable
    System.Collections.Generic.IEnumerator<ExcelRangeBase>
    System.Collections.IEnumerator
    System.IDisposable
  Inherited Members
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
  Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelRange : ExcelRangeBase, IEnumerable<ExcelRangeBase>, IEnumerable, IEnumerator<ExcelRangeBase>, IEnumerator, IDisposable
  Properties
Item[Int32, Int32]
Access a single cell
Declaration
public ExcelRange this[int Row, int Col] { get; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | Row | The row  | 
      
| System.Int32 | Col | The column  | 
      
Property Value
| Type | Description | 
|---|---|
| ExcelRange | A range object  | 
      
Item[Int32, Int32, Int32, Int32]
Access a range of cells
Declaration
public ExcelRange this[int FromRow, int FromCol, int ToRow, int ToCol] { get; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | FromRow | Start row  | 
      
| System.Int32 | FromCol | Start column  | 
      
| System.Int32 | ToRow | End Row  | 
      
| System.Int32 | ToCol | End Column  | 
      
Property Value
| Type | Description | 
|---|---|
| ExcelRange | 
Item[String]
Access the range using an address
Declaration
public ExcelRange this[string Address] { get; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | Address | The address  | 
      
Property Value
| Type | Description | 
|---|---|
| ExcelRange | A range object  | 
      
Methods
SetFormula(String, Boolean)
Set the formula for the range.
Declaration
public void SetFormula(string formula, bool asSharedFormula = true)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | formula | The formula for the range.  | 
      
| System.Boolean | asSharedFormula | 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.  | 
      
Implements
      System.Collections.Generic.IEnumerable<T>
  
  
      System.Collections.IEnumerable
  
  
      System.Collections.Generic.IEnumerator<T>
  
  
      System.Collections.IEnumerator
  
  
      System.IDisposable