Class OfficeProperties
Provides access to the properties bag of the package
Inherited Members
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public sealed class OfficeProperties : XmlHelper
Properties
AppVersion
Gets/Set the AppVersion property of the document (extended property)
Declaration
public string AppVersion { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Application
Gets/Set the Application property of the document (extended property)
Declaration
public string Application { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Author
Gets/sets the author property of the document (core property)
Declaration
public string Author { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Category
Gets/sets the category property of the document (core property)
Declaration
public string Category { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Comments
Gets/sets the comments property of the document (core property)
Declaration
public string Comments { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Company
Gets/sets the Company property of the document (extended property)
Declaration
public string Company { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CorePropertiesXml
Provides access to the XML document that holds all the code document properties.
Declaration
public XmlDocument CorePropertiesXml { get; }
Property Value
| Type | Description |
|---|---|
| XmlDocument |
Created
Gets/sets the created property of the document (core property)
Declaration
public DateTime Created { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
CustomPropertiesXml
Provides access to the XML document which holds the document's custom properties
Declaration
public XmlDocument CustomPropertiesXml { get; }
Property Value
| Type | Description |
|---|---|
| XmlDocument |
ExtendedPropertiesXml
Provides access to the XML document that holds the extended properties of the document (app.xml)
Declaration
public XmlDocument ExtendedPropertiesXml { get; }
Property Value
| Type | Description |
|---|---|
| XmlDocument |
HyperlinkBase
Gets/sets the HyperlinkBase property of the document (extended property)
Declaration
public Uri HyperlinkBase { get; set; }
Property Value
| Type | Description |
|---|---|
| Uri |
HyperlinksChanged
Hyperlinks need update
Declaration
public bool HyperlinksChanged { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Keywords
Gets/sets the keywords property of the document (core property)
Declaration
public string Keywords { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LastModifiedBy
Gets/sets the lastModifiedBy property of the document (core property)
Declaration
public string LastModifiedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LastPrinted
Gets/sets the lastPrinted property of the document (core property)
Declaration
public string LastPrinted { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LinksUpToDate
Indicates whether hyperlinks in a document are up-to-date
Declaration
public bool LinksUpToDate { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Manager
Gets/sets the Manager property of the document (extended property)
Declaration
public string Manager { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Modified
Gets/sets the modified property of the document (core property)
Declaration
public DateTime Modified { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
ScaleCrop
Display mode of the document thumbnail. True to enable scaling. False to enable cropping.
Declaration
public bool ScaleCrop { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
SharedDoc
If true, document is shared between multiple producers.
Declaration
public bool SharedDoc { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Status
Gets/sets the status property of the document (core property)
Declaration
public string Status { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Subject
Gets/sets the subject property of the document (core property)
Declaration
public string Subject { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Title
Gets/sets the title property of the document (core property)
Declaration
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetCustomPropertyValue(string)
Gets the value of a custom property
Declaration
public object GetCustomPropertyValue(string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property |
Returns
| Type | Description |
|---|---|
| object | The current value of the property |
GetExtendedPropertyValue(string)
Get the value of an extended property
Declaration
public string GetExtendedPropertyValue(string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property |
Returns
| Type | Description |
|---|---|
| string | The value |
SetCustomPropertyValue(string, object)
Allows you to set the value of a current custom property or create your own custom property.
Declaration
public void SetCustomPropertyValue(string propertyName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property |
| object | value | The value of the property |
SetExtendedPropertyValue(string, string)
Set the value for an extended property
Declaration
public void SetExtendedPropertyValue(string propertyName, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | The name of the property |
| string | value | The value |