DocumentProperty class

DocumentProperty class

Represents a custom or built-in document property.

The DocumentProperty type exposes the following members:

Properties

PropertyDescription
nameReturns the name of the property.
valueGets or sets the value of the property.
is_linked_to_contentIndicates whether this property is linked to content
sourceThe linked content source.
typeGets the data type of the property.
is_generated_nameReturns true if this property does not have a name in the OLE2 storage
and a unique name was generated only for the public API.

Methods

MethodDescription
to_int(self)Returns the property value as integer.
to_double(self)Returns the property value as double.
to_date_time(self)Returns the property value as DateTime in local timezone.
to_bool(self)Returns the property value as bool.

Example

from aspose.cells import Workbook

# Instantiate a Workbook object
workbook = Workbook("book1.xls")
# Retrieve a list of all custom document properties of the Excel file
customProperties = workbook.worksheets.custom_document_properties
# Accessng a custom document property by using the property index
customProperty1 = customProperties[3]
# Accessng a custom document property by using the property name
customProperty2 = customProperties.get("Owner")

See Also