[]
Gets the index of a property by name.
int IndexOf(string name)
Function IndexOf(name As String) As Integer
| Type | Name | Description |
|---|---|---|
| string | name | The case-insensitive name of the property. |
| Type | Description |
|---|---|
| int | The zero-based index of the property. Returns a negative value if the property is not found. |
ICustomDocumentPropertyCollection properties = workbook.CustomDocumentProperties;
properties.Add("Department", "Sales");
int index = properties.IndexOf("department");