DocumentProperty Class

Represents a custom or built-in document property.
Inheritance Hierarchy
SystemObject
  Aspose.Cells.PropertiesDocumentProperty

Namespace:  Aspose.Cells.Properties
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 21.7.0.0 (21.7)
Syntax
public class DocumentProperty

The DocumentProperty type exposes the following members.

Properties
  NameDescription
Public propertyIsGeneratedName
Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API.
Public propertyIsLinkedToContent
Indicates whether this property is linked to content
Public propertyName
Returns the name of the property.
Public propertySource
The linked content source.
Public propertyType
Gets the data type of the property.
Public propertyValue
Gets or sets the value of the property.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToBool
Returns the property value as bool.
Public methodToDateTime
Returns the property value as DateTime in local timezone.
Public methodToDouble
Returns the property value as double.
Public methodToInt
Returns the property value as integer.
Public methodToString
Returns the property value as a string.
(Overrides ObjectToString.)
Examples
[C#]

//Instantiate a Workbook object
Workbook workbook = new Workbook("C:\\book1.xls");

//Retrieve a list of all custom document properties of the Excel file
DocumentPropertyCollection customProperties = workbook.Worksheets.CustomDocumentProperties;

//Accessng a custom document property by using the property index
DocumentProperty customProperty1 = customProperties[3];

//Accessng a custom document property by using the property name
DocumentProperty customProperty2 = customProperties["Owner"];

[VB.NET]

'Instantiate a Workbook object
Dim workbook As Workbook = New Workbook("C:\\book1.xls")

'Retrieve a list of all custom document properties of the Excel file
Dim customProperties As DocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties

'Accessng a custom document property by using the property index
Dim customProperty1 As DocumentProperty = customProperties(3)

'Accessng a custom document property by using the property name
Dim customProperty2 As DocumentProperty = customProperties("Owner")
See Also