asposecells.api

Class DocumentProperty

Represents a custom or built-in document property.

Example:

# Instantiate a Workbook object
workbook = Workbook("CustomProperties.xlsx")
# Retrieve a list of all custom document properties of the Excel file
customProperties = workbook.getWorksheets().getCustomDocumentProperties()
# Accessng a custom document property by using the property index
customProperty1 = customProperties.get(3)
# Accessng a custom document property by using the property name
customProperty2 = customProperties.get("Owner")

Property Getters/Setters Summary
methodisGeneratedName()
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.
methodisLinkedToContent()
Indicates whether this property is linked to content
methodgetName()
Returns the name of the property.
methodgetSource()
The linked content source.
methodgetType()
Gets the data type of the property. The value of the property is PropertyType integer constant.
methodgetValue()
method
setValue(value)
           Gets or sets the value of the property.
 
Method Summary
methodtoBool()
Returns the property value as bool.
methodtoDateTime()
Returns the property value as DateTime in local timezone.
methodtoDouble()
Returns the property value as double.
methodtoInt()
Returns the property value as integer.
methodtoString()
Returns the property value as a string.
 

    • Property Getters/Setters Detail

      • getName : String 

        String getName()
        
        Returns the name of the property.
      • getValue/setValue : Object 

        Object getValue() / setValue(value)
        
        Gets or sets the value of the property.
      • isLinkedToContent : boolean 

        boolean isLinkedToContent()
        
        Indicates whether this property is linked to content
      • getSource : String 

        String getSource()
        
        The linked content source.
      • getType : int 

        int getType()
        
        Gets the data type of the property. The value of the property is PropertyType integer constant.
      • isGeneratedName : boolean 

        boolean isGeneratedName()
        
        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.
    • Method Detail

      • toString

        String toString()
        Returns the property value as a string.

        Converts a number property using Object.ToString(). Converts a boolean property into "Y" or "N". Converts a date property into a short date string.

      • toInt

        int toInt()
        Returns the property value as integer. Throws an exception if the property type is not PropertyType.Number.
      • toDouble

        float toDouble()
        Returns the property value as double. Throws an exception if the property type is not PropertyType.Float.
      • toDateTime

        DateTime toDateTime()
        Returns the property value as DateTime in local timezone.

        Throws an exception if the property type is not PropertyType.Date.

      • toBool

        boolean toBool()
        Returns the property value as bool.

        Throws an exception if the property type is not PropertyType.Boolean.