CustomDocumentPropertyCollection

CustomDocumentPropertyCollection class

A collection of custom document properties.

public class CustomDocumentPropertyCollection : DocumentPropertyCollection

Properties

Name Description
Count { get; } Gets number of items in the collection.(Inherited from DocumentPropertyCollection.)
Item { get; } Returns a DocumentProperty object by index.(Inherited from DocumentPropertyCollection.)
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.
Clear() Removes all properties from the collection.(Inherited from DocumentPropertyCollection.)
Contains(string) Returns true if a property with the specified name exists in the collection.(Inherited from DocumentPropertyCollection.)
GetEnumerator() (Inherited from DocumentPropertyCollection.)
IndexOf(string) Gets the index of a property by name.(Inherited from DocumentPropertyCollection.)
Remove(string) Removes a property with the specified name from the collection.(Inherited from DocumentPropertyCollection.)
RemoveAt(int) Removes a property at the specified index.(Inherited from DocumentPropertyCollection.)
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