Class ExcelProtectedRangeCollection
A collection of protected ranges in the worksheet.
Excel
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. |
Item[Int32]
Indexer for the collection
Declaration
public ExcelProtectedRange this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System. |
index | The index to return |
Property Value
Type | Description |
---|---|
Excel |
Methods
Add(String, ExcelAddress)
Adds a new protected range
Declaration
public ExcelProtectedRange Add(string name, ExcelAddress address)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the protected range |
Excel |
address | The address within the worksheet |
Returns
Type | Description |
---|---|
Excel |
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 |
---|---|---|
Excel |
item |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Excel |
array | The array |
System. |
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 |
---|---|---|
Excel |
item | The item |
Returns
Type | Description |
---|---|
System. |
Remove(ExcelProtectedRange)
Remove the specified item from the collection
Declaration
public bool Remove(ExcelProtectedRange item)
Parameters
Type | Name | Description |
---|---|---|
Excel |
item | The item |
Returns
Type | Description |
---|---|
System. |
RemoveAt(Int32)
Remove the item at the specified indexx
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System. |
index |
Explicit Interface Implementations
IEnumerable<ExcelProtectedRange>.GetEnumerator()
Get the enumerator
Declaration
IEnumerator<ExcelProtectedRange> IEnumerable<ExcelProtectedRange>.GetEnumerator()
Returns
Type | Description |
---|---|
System. |
The enumerator |
IEnumerable.GetEnumerator()
Get the enumerator
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System. |
The enumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable