Class ExcelProtectedRangeCollection
A collection of protected ranges in the worksheet. ExcelProtection ExcelSheetProtection ExcelEncryption
Implements
System.Collections.Generic.IEnumerable<ExcelProtectedRange>
    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
Assembly: EPPlus.dll
Syntax
public class ExcelProtectedRangeCollection : XmlHelper, IEnumerable<ExcelProtectedRange>, IEnumerable
  Properties
Count
Numner of items in the collection
Declaration
public int Count { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Item[Int32]
Indexer for the collection
Declaration
public ExcelProtectedRange this[int index] { get; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | The index to return  | 
      
Property Value
| Type | Description | 
|---|---|
| ExcelProtectedRange | 
Methods
Add(String, ExcelAddress)
Adds a new protected range
Declaration
public ExcelProtectedRange Add(string name, ExcelAddress address)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The name of the protected range  | 
      
| ExcelAddress | address | The address within the worksheet  | 
      
Returns
| Type | Description | 
|---|---|
| ExcelProtectedRange | 
Clear()
Clears all protected ranges
Declaration
public void Clear()
  Contains(ExcelProtectedRange)
Checks if the collection contains a specific item.
Declaration
public bool Contains(ExcelProtectedRange item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ExcelProtectedRange | item | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
CopyTo(ExcelProtectedRange[], Int32)
Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(ExcelProtectedRange[] array, int arrayIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ExcelProtectedRange[] | array | The array  | 
      
| System.Int32 | arrayIndex | The index  | 
      
IndexOf(ExcelProtectedRange)
Get the index in the collection of the supplied item
Declaration
public int IndexOf(ExcelProtectedRange item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ExcelProtectedRange | item | The item  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Remove(ExcelProtectedRange)
Remove the specified item from the collection
Declaration
public bool Remove(ExcelProtectedRange item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ExcelProtectedRange | item | The item  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
RemoveAt(Int32)
Remove the item at the specified indexx
Declaration
public void RemoveAt(int index)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | 
Explicit Interface Implementations
IEnumerable<ExcelProtectedRange>.GetEnumerator()
Get the enumerator
Declaration
IEnumerator<ExcelProtectedRange> IEnumerable<ExcelProtectedRange>.GetEnumerator()
  Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerator<ExcelProtectedRange> | The enumerator  | 
      
IEnumerable.GetEnumerator()
Get the enumerator
Declaration
IEnumerator IEnumerable.GetEnumerator()
  Returns
| Type | Description | 
|---|---|
| System.Collections.IEnumerator | The enumerator  | 
      
Implements
      System.Collections.Generic.IEnumerable<T>
  
  
      System.Collections.IEnumerable