Class ExcelSensibilityLabelCollection
A collection of sensibility labels applied to a workbook.
Inheritance
Inherited Members
Namespace: OfficeOpenXml.SensitivityLabels
Assembly: EPPlus.dll
Syntax
public class ExcelSensibilityLabelCollection
Properties
Labels
Contains sensitivity labels for the package. Only the last sensitivity will be applied on save.
Declaration
public EPPlusReadOnlyList<IExcelSensibilityLabel> Labels { get; }
Property Value
Type | Description |
---|---|
EPPlusReadOnlyList<OfficeOpenXml.Interfaces.SensitivityLabels.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. OfficeOpenXml.Interfaces.SensitivityLabels.ISensitivityLabelHandler.DecryptPackageAsync(System.IO.MemoryStream,System.String) OfficeOpenXml.Interfaces.SensitivityLabels.ISensitivityLabelHandler.ApplyLabelAndSavePackageAsync(OfficeOpenXml.Interfaces.SensitivityLabels.IPackageInfo,System.String)
Declaration
public object ProtectionInformation { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
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.
Declaration
public void SetActiveLabelById(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id for the sensibility label without heading and traling brackets. |
SetActiveLabelById(String, String, eMethod, Boolean)
Changes the active sensibility label. This will overwrite the active sensibility label and any settings derived from it, if the SensibilityLabelHandler is used.
Declaration
public void SetActiveLabelById(string id, string siteId, eMethod method = eMethod.Privileged, bool clearLabels = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id for the sensibility label without heading and traling brackets. |
System.String | siteId | The site id for the tenent. This id is used if no SensibilityLabelHandler is set. |
OfficeOpenXml.Interfaces.SensitivityLabels.eMethod | method | Sets the method property. This property is used if no SensibilityLabelHandler is set. |
System.Boolean | clearLabels | 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.
Declaration
public void SetActiveLabelByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |