CustomDocumentPropertyCollection

CustomDocumentPropertyCollection class

A collection of custom document properties.

public class CustomDocumentPropertyCollection : DocumentPropertyCollection

Properties

Name Description
Capacity { get; set; }
Count { get; }
Item { get; } Returns a DocumentProperty object by index.(Inherited from DocumentPropertyCollection.)
Item { get; set; }
virtual Item { get; } Returns a DocumentProperty object by the name of the property.(Inherited from DocumentPropertyCollection.)

Methods

Name Description
Add(string, bool) Creates a new custom document property of the PropertyType.Boolean data type.
Add(string, DateTime) Creates a new custom document property of the PropertyType.DateTime data type.
Add(string, double) Creates a new custom document property of the PropertyType.Float data type.
Add(string, int) Creates a new custom document property of the PropertyType.Number data type.
Add(string, string) Creates a new custom document property of the PropertyType.String data type.
AddLinkToContent(string, string) Creates a new custom document property which links to content.
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.(Inherited from DocumentPropertyCollection.)
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.(Inherited from DocumentPropertyCollection.)
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.(Inherited from DocumentPropertyCollection.)
RemoveAt(int) Removes a property at the specified index. (2 methods)
UpdateLinkedPropertyValue() Update custom document property value which links to content.
UpdateLinkedRange() Update custom document property value to linked range.

Remarks

Each DocumentProperty object represents a custom property of a container document.

Examples


[C#]

//Instantiate a Workbook object
Workbook workbook = new Workbook("book1.xls");

//Retrieve a list of all custom document properties of the Excel file
CustomDocumentPropertyCollection customProperties = workbook.Worksheets.CustomDocumentProperties;

[VB.NET]

'Instantiate a Workbook object
Dim workbook As New Workbook("book1.xls")

'Retrieve a list of all custom document properties of the Excel file
Dim customProperties As CustomDocumentPropertyCollection = workbook.Worksheets.CustomDocumentProperties

See Also