public abstract class DocumentPropertyCollection extends CollectionBase
BuiltInDocumentPropertyCollection and CustomDocumentPropertyCollection collections.
Example
//Instantiate a Workbook object by calling its empty constructor
Workbook workbook = new Workbook("book1.xls");
//Retrieve a list of all custom document properties of the Excel file
DocumentPropertyCollection customProperties = workbook.getWorksheets().getCustomDocumentProperties();
//Accessng a custom document property by using the property index
DocumentProperty customProperty1 = customProperties.get(3);
//Accessng a custom document property by using the property name
DocumentProperty customProperty2 = customProperties.get("Owner");
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.String name)
Returns true if a property with the specified name exists in the collection.
|
DocumentProperty |
get(int index)
Returns a
DocumentProperty object by index. |
DocumentProperty |
get(java.lang.String name)
Returns a
DocumentProperty object by the name of the property. |
int |
indexOf(java.lang.String name)
Gets the index of a property by name.
|
void |
remove(java.lang.String name)
Removes a property with the specified name from the collection.
|
void |
removeAt(int index)
Removes a property at the specified index.
|
public DocumentProperty get(java.lang.String name)
DocumentProperty object by the name of the property.
Remarks
Returns null if a property with the specified name is not found.
name - The case-insensitive name of the property to retrieve.public DocumentProperty get(int index)
DocumentProperty object by index.get in class CollectionBaseindex - Zero-based index of the DocumentProperty to retrieve.public boolean contains(java.lang.String name)
name - The case-insensitive name of the property.public int indexOf(java.lang.String name)
name - The case-insensitive name of the property.public void remove(java.lang.String name)
name - The case-insensitive name of the property.public void removeAt(int index)
removeAt in class CollectionBaseindex - The zero based index.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.