asposecells.api

Class CustomDocumentPropertyCollection

A collection of custom document properties.

Each DocumentProperty object represents a custom property of a container document.

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()

Property Getters/Setters Summary
methodgetCount()
Gets number of items in the collection.
methodget(index)
Returns a DocumentProperty object by index.
methodget(name)
Returns a DocumentProperty object by the name of the property.
 
Method Summary
methodadd(name, value)
Creates a new custom document property of the PropertyType.Boolean data type.
methodadd(name, value)
Creates a new custom document property of the PropertyType.DateTime data type.
methodadd(name, value)
Creates a new custom document property of the PropertyType.Float data type.
methodadd(name, value)
Creates a new custom document property of the PropertyType.Number data type.
methodadd(name, value)
Creates a new custom document property of the PropertyType.String data type.
methodaddLinkToContent(name, source)
Creates a new custom document property which links to content.
methodclear()
Removes all properties from the collection.
methodcontains(name)
Returns true if a property with the specified name exists in the collection.
methodindexOf(name)
Gets the index of a property by name.
methoditerator()
methodremove(name)
Removes a property with the specified name from the collection.
methodremoveAt(index)
Removes a property at the specified index.
methodupdateLinkedPropertyValue()
Update custom document property value which links to content.
methodupdateLinkedRange()
Update custom document property value to linked range.
 

    • Method Detail

      • add

        DocumentProperty add(name, value)
        Creates a new custom document property of the PropertyType.String data type.
        Parameters:
        name: String - The name of the property.
        value: String - The value of the property.
        Returns:
        The newly created property object.
      • add

        DocumentProperty add(name, value)
        Creates a new custom document property of the PropertyType.Number data type.
        Parameters:
        name: String - The name of the property.
        value: int - The value of the property.
        Returns:
        The newly created property object.
      • add

        DocumentProperty add(name, value)
        Creates a new custom document property of the PropertyType.DateTime data type.
        Parameters:
        name: String - The name of the property.
        value: DateTime - The value of the property.
        Returns:
        The newly created property object.
      • add

        DocumentProperty add(name, value)
        Creates a new custom document property of the PropertyType.Boolean data type.
        Parameters:
        name: String - The name of the property.
        value: boolean - The value of the property.
        Returns:
        The newly created property object.
      • add

        DocumentProperty add(name, value)
        Creates a new custom document property of the PropertyType.Float data type.
        Parameters:
        name: String - The name of the property.
        value: float - The value of the property.
        Returns:
        The newly created property object.
      • addLinkToContent

        DocumentProperty addLinkToContent(name, source)
        Creates a new custom document property which links to content.
        Parameters:
        name: String - The name of the property.
        source: String - The source of the property
        Returns:
        The newly created property object.
      • updateLinkedPropertyValue

         updateLinkedPropertyValue()
        Update custom document property value which links to content.
      • updateLinkedRange

         updateLinkedRange()
        Update custom document property value to linked range.
      • iterator

        Iterator iterator()
        Returns:
      • contains

        boolean contains(name)
        Returns true if a property with the specified name exists in the collection.
        Parameters:
        name: String - The case-insensitive name of the property.
        Returns:
        True if the property exists in the collection; false otherwise.
      • indexOf

        int indexOf(name)
        Gets the index of a property by name.
        Parameters:
        name: String - The case-insensitive name of the property.
        Returns:
        The zero based index. Negative value if not found.
      • remove

         remove(name)
        Removes a property with the specified name from the collection.
        Parameters:
        name: String - The case-insensitive name of the property.
      • removeAt

         removeAt(index)
        Removes a property at the specified index.
        Parameters:
        index: int - The zero based index.
      • clear

         clear()
        Removes all properties from the collection.