Class ExcelSensibilityLabelCollection¶
Namespace: OfficeOpenXml.SensitivityLabels
Assembly: EPPlus.dll
A collection of sensibility labels applied to a workbook.
Inheritance¶
object ← ExcelSensibilityLabelCollection
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Properties¶
Labels¶
Contains sensitivity labels for the package. Only the last sensitivity will be applied on save.
Property Value¶
EPPlusReadOnlyList<IExcelSensibilityLabel>
ProtectionInformation¶
Property used by the SensibilityLabelHandler to store information about the sensibility label.
The information is passed when calling the DecryptPackageAsync and ApplyLabelAndSavePackageAsync methods.
DecryptPackageAsync(MemoryStream, string)
ApplyLabelAndSavePackageAsync(IPackageInfo, string)
Property Value¶
Methods¶
SetActiveLabelById(string)¶
Changes the active sensibility label. This will overwrite the active sensibility label and any settings derived from it, if the SensibilityLabelHandler is used.
Parameters¶
id string
The id for the sensibility label without heading and traling brackets.
SetActiveLabelById(string, string, eMethod, bool)¶
Changes the active sensibility label. This will overwrite the active sensibility label and any settings derived from it, if the SensibilityLabelHandler is used.
public void SetActiveLabelById(string id, string siteId, eMethod method = 2, bool clearLabels = true)
Parameters¶
id string
The id for the sensibility label without heading and traling brackets.
siteId string
The site id for the tenent. This id is used if no SensibilityLabelHandler is set.
method eMethod
Sets the method property. This property is used if no SensibilityLabelHandler is set.
clearLabels bool
If true, will not clear the Labels collection. If false, will set the active sensibility label(if any) to Readonly=true and Enabled=false
SetActiveLabelByName(string)¶
Changes the active sensibility label. This will overwrite the active sensibility label and any settings derived from it.
Parameters¶
name string