Class DocumentPropertyCollection
Namespace: Aspose.Cells.Properties
Assembly: Aspose.Cells.dll (25.2.0)
Base class for Aspose.Cells.Properties.BuiltInDocumentPropertyCollection and Aspose.Cells.Properties.CustomDocumentPropertyCollection collections.
public abstract class DocumentPropertyCollection : CollectionBase<documentproperty>, IList<documentproperty>, ICollection<documentproperty>, IEnumerable<documentproperty>, ICollection, IEnumerable
Inheritance
object ← CollectionBase<documentproperty> ← DocumentPropertyCollection
Derived
BuiltInDocumentPropertyCollection, CustomDocumentPropertyCollection
Implements
IList<documentproperty>, ICollection<documentproperty>, IEnumerable<documentproperty>, ICollection, IEnumerable
Inherited Members
CollectionBase<documentproperty>.BinarySearch(DocumentProperty), CollectionBase<documentproperty>.BinarySearch(DocumentProperty, IComparer<documentproperty>), CollectionBase<documentproperty>.BinarySearch(int, int, DocumentProperty, IComparer<documentproperty>), CollectionBase<documentproperty>.Contains(DocumentProperty), CollectionBase<documentproperty>.CopyTo(DocumentProperty[]), CollectionBase<documentproperty>.CopyTo(DocumentProperty[], int), CollectionBase<documentproperty>.CopyTo(int, DocumentProperty[], int, int), CollectionBase<documentproperty>.Exists(Predicate<documentproperty>), CollectionBase<documentproperty>.Find(Predicate<documentproperty>), CollectionBase<documentproperty>.FindAll(Predicate<documentproperty>), CollectionBase<documentproperty>.FindIndex(Predicate<documentproperty>), CollectionBase<documentproperty>.FindIndex(int, Predicate<documentproperty>), CollectionBase<documentproperty>.FindIndex(int, int, Predicate<documentproperty>), CollectionBase<documentproperty>.FindLast(Predicate<documentproperty>), CollectionBase<documentproperty>.FindLastIndex(Predicate<documentproperty>), CollectionBase<documentproperty>.FindLastIndex(int, Predicate<documentproperty>), CollectionBase<documentproperty>.FindLastIndex(int, int, Predicate<documentproperty>), CollectionBase<documentproperty>.IndexOf(DocumentProperty), CollectionBase<documentproperty>.IndexOf(DocumentProperty, int), CollectionBase<documentproperty>.IndexOf(DocumentProperty, int, int), CollectionBase<documentproperty>.LastIndexOf(DocumentProperty), CollectionBase<documentproperty>.LastIndexOf(DocumentProperty, int), CollectionBase<documentproperty>.LastIndexOf(DocumentProperty, int, int), CollectionBase<documentproperty>.GetEnumerator(), CollectionBase<documentproperty>.Clear(), CollectionBase<documentproperty>.RemoveAt(int), CollectionBase<documentproperty>.OnClearComplete(), CollectionBase<documentproperty>.OnClear(), CollectionBase<documentproperty>.Capacity, CollectionBase<documentproperty>.Count, CollectionBase<documentproperty>.InnerList, CollectionBase<documentproperty>.this[int], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
csharp
[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"];
'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")
Properties
this[string]
Returns a Aspose.Cells.Properties.DocumentProperty object by the name of the property.
public virtual DocumentProperty this[string name] { get; }
Property Value
Remarks
Returns null if a property with the specified name is not found.
this[int]
Returns a Aspose.Cells.Properties.DocumentProperty object by index.
public DocumentProperty this[int index] { get; }
Property Value
Methods
Contains(string)
Returns true if a property with the specified name exists in the collection.
public bool Contains(string name)
Parameters
name
string
The case-insensitive name of the property.
Returns
True if the property exists in the collection; false otherwise.
IndexOf(string)
Gets the index of a property by name.
public int IndexOf(string name)
Parameters
name
string
The case-insensitive name of the property.
Returns
The zero based index. Negative value if not found.
Remove(string)
Removes a property with the specified name from the collection.
public void Remove(string name)
Parameters
name
string
The case-insensitive name of the property.
RemoveAt(int)
Removes a property at the specified index.
public void RemoveAt(int index)
Parameters
index
int
The zero based index. </documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty></documentproperty>