[]
Represents a collection of document properties.
This interface provides access to built-in and custom document properties in a workbook. Use it to retrieve properties by name or index, check whether a property exists, get the number of properties, or remove properties from the collection.
public interface IDocumentPropertyCollection
Public Interface IDocumentPropertyCollection
ICustomDocumentPropertyCollection customProperties = workbook.CustomDocumentProperties;
customProperties.Add("Department", "Sales");
IDocumentPropertyCollection properties = customProperties;
IDocumentProperty property = properties["Department"];
| Name | Description |
|---|---|
| Count | Gets the number of document properties in the collection. |
| this[int] | Gets the IDocumentProperty object at the specified index in the collection. |
| this[string] | Gets the IDocumentProperty object with the specified name. |
| Name | Description |
|---|---|
| Clear() | Removes all properties from the collection. Use this method to empty a document property collection before adding a new set of properties. |
| Contains(string) | Determines whether a document property with the specified name exists in this collection. |
| IndexOf(string) | Gets the index of a property by name. |
| Remove(string) | Removes the property with the specified name from the collection. |
| RemoveAt(int) | Removes the property at the specified zero-based index. |