Table of Contents

Class ExcelProtectedRangeCollection

Namespace
OfficeOpenXml
Assembly
EPPlus.dll

A collection of protected ranges in the worksheet. ExcelProtection ExcelSheetProtection ExcelEncryption

public class ExcelProtectedRangeCollection : XmlHelper, IEnumerable<ExcelProtectedRange>, IEnumerable
Inheritance
ExcelProtectedRangeCollection
Implements
Inherited Members

Properties

Count

Numner of items in the collection

public int Count { get; }

Property Value

int

this[int]

Indexer for the collection

public ExcelProtectedRange this[int index] { get; }

Parameters

index int

The index to return

Property Value

ExcelProtectedRange

Methods

Add(string, ExcelAddress)

Adds a new protected range

public ExcelProtectedRange Add(string name, ExcelAddress address)

Parameters

name string

The name of the protected range

address ExcelAddress

The address within the worksheet

Returns

ExcelProtectedRange

Clear()

Clears all protected ranges

public void Clear()

Contains(ExcelProtectedRange)

Checks if the collection contains a specific item.

public bool Contains(ExcelProtectedRange item)

Parameters

item ExcelProtectedRange

Returns

bool

CopyTo(ExcelProtectedRange[], int)

Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.

public void CopyTo(ExcelProtectedRange[] array, int arrayIndex)

Parameters

array ExcelProtectedRange[]

The array

arrayIndex int

The index

IndexOf(ExcelProtectedRange)

Get the index in the collection of the supplied item

public int IndexOf(ExcelProtectedRange item)

Parameters

item ExcelProtectedRange

The item

Returns

int

Remove(ExcelProtectedRange)

Remove the specified item from the collection

public bool Remove(ExcelProtectedRange item)

Parameters

item ExcelProtectedRange

The item

Returns

bool

RemoveAt(int)

Remove the item at the specified indexx

public void RemoveAt(int index)

Parameters

index int