Class DocumentPropertyCollection
Contents
[
Hide
]DocumentPropertyCollection class
Base class for BuiltInDocumentPropertyCollection
and CustomDocumentPropertyCollection
collections.
public abstract class DocumentPropertyCollection : CollectionBase<DocumentProperty>
Properties
Name | Description |
---|---|
Capacity { get; set; } | |
Count { get; } | |
Item { get; } | Returns a DocumentProperty object by index. |
Item { get; set; } | |
virtual Item { get; } | Returns a DocumentProperty object by the name of the property. |
Methods
Name | Description |
---|---|
BinarySearch(DocumentProperty) | |
BinarySearch(DocumentProperty, IComparer<DocumentProperty>) | |
BinarySearch(int, int, DocumentProperty, IComparer<DocumentProperty>) | |
Clear() | |
Contains(DocumentProperty) | |
Contains(string) | Returns true if a property with the specified name exists in the collection. |
CopyTo(DocumentProperty[]) | |
CopyTo(DocumentProperty[], int) | |
CopyTo(int, DocumentProperty[], int, int) | |
Exists(Predicate<DocumentProperty>) | |
Find(Predicate<DocumentProperty>) | |
FindAll(Predicate<DocumentProperty>) | |
FindIndex(Predicate<DocumentProperty>) | |
FindIndex(int, Predicate<DocumentProperty>) | |
FindIndex(int, int, Predicate<DocumentProperty>) | |
FindLast(Predicate<DocumentProperty>) | |
FindLastIndex(Predicate<DocumentProperty>) | |
FindLastIndex(int, Predicate<DocumentProperty>) | |
FindLastIndex(int, int, Predicate<DocumentProperty>) | |
GetEnumerator() | |
IndexOf(DocumentProperty) | |
IndexOf(string) | Gets the index of a property by name. |
IndexOf(DocumentProperty, int) | |
IndexOf(DocumentProperty, int, int) | |
LastIndexOf(DocumentProperty) | |
LastIndexOf(DocumentProperty, int) | |
LastIndexOf(DocumentProperty, int, int) | |
Remove(string) | Removes a property with the specified name from the collection. |
RemoveAt(int) | Removes a property at the specified index. (2 methods) |
Examples
[C#]
//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.Worksheets.CustomDocumentProperties;
//Accessng a custom document property by using the property index
DocumentProperty customProperty1 = customProperties[3];
//Accessng a custom document property by using the property name
DocumentProperty customProperty2 = customProperties["Owner"];
[VB.NET]
'Instantiate a Workbook object by calling its empty constructor
Dim workbook As Workbook = New Workbook("book1.xls")
'Retrieve a list of all custom document properties of the Excel file
Dim customProperties As DocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties
'Accessng a custom document property by using the property index
Dim customProperty1 As DocumentProperty = customProperties(3)
'Accessng a custom document property by using the property name
Dim customProperty2 As DocumentProperty = customProperties("Owner")
See Also
- class CollectionBase<T>
- class DocumentProperty
- namespace Aspose.Cells.Properties
- assembly Aspose.Cells