asposecells.api
Class DocumentPropertyCollection

Base class for BuiltInDocumentPropertyCollection and CustomDocumentPropertyCollection collections.

Example:

# Instantiate a Workbook object by calling its empty constructor
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
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
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.
 

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

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.