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()→ inherited from DocumentPropertyCollection
           Removes all properties from the collection.
methodcontains(name)→ inherited from DocumentPropertyCollection
           Returns true if a property with the specified name exists in the collection.
methodindexOf(name)→ inherited from DocumentPropertyCollection
           Gets the index of a property by name.
methoditerator()→ inherited from DocumentPropertyCollection
          
methodremove(name)→ inherited from DocumentPropertyCollection
           Removes a property with the specified name from the collection.
methodremoveAt(index)→ inherited from DocumentPropertyCollection
           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.
 

Property Getters/Setters Detail

getCount : int 

int getCount()
Gets number of items in the collection.

get : DocumentProperty 

DocumentProperty get(name)
Returns a DocumentProperty object by the name of the property.

Returns null if a property with the specified name is not found.

Parameters:
name - The case-insensitive name of the property to retrieve.

get : DocumentProperty 

DocumentProperty get(index)
Returns a DocumentProperty object by index.
Parameters:
index - Zero-based index of the DocumentProperty to retrieve.

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.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.