Description
The DocumentProperties object represents properties of a spreadsheet.
- In Excel 2003 these properties can be accessed via (File -> Properties).
- In Excel 2007 they can be accessed via (Ribbon button -> Prepare -> Properties).
- In Excel 2010 they can be accessed via (File -> Info -> Show All Properties on the right).
- In Windows Explorer, right-click on the file and select 'Properties'.
The DocumentProperties
class can be used to remove personal information from an existing spreadsheet, or to populate searchable fields that can be used to locate the file.
C#
vb.net
Remarks
To return aDocumentProperties
object, use Workbook.DocumentProperties.
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Sets or returns the name of the application that created the spreadsheet. | |
Sets or returns the author of the spreadsheet. The author proporty can be used to search for an Excel file. | |
Sets or returns the category of the spreadsheet. The category property can be used to search for an Excel file. | |
Sets or returns the value of the Comments field in a workbook's Properties sheet. Comments can used to search for an Excel file. | |
Sets or returns the value of the Company field in a workbook's Properties sheet. Windows can search for an Excel file using this value. | |
Sets or returns the workbook's creation date. By default, CreationDate returns the spreadsheet's actual creation date. You can set CreationDate to a different date, but this will not change the creation date displayed in the spreadsheet's Properties sheet. |
|
Sets or returns keywords that can be used to search for the spreadsheet. In Excel, a file's keywords are displayed in the Summary page of the Properties sheet. | |
Sets or returns the date on which the current spreadsheet was last saved. This value is not set by default, is not displayed in the spreadsheet's Properties sheet, and cannot be used to search for a file. | |
Sets or returns the value of the Manager field in the spreadsheet's Properties sheet. The manager property can be used to search for an Excel file. | |
Sets or returns the value of the Title field in a workbook's Properties sheet. The title property can be used to search for an Excel file. |
Indexers
Name |
Description |
---|---|
Returns the value of a specified built-in property. The value can be one of the following types, depending on the property: String, Double, Integer, Boolean or DateTime. | |
Returns the value of a specified property. The value can be one of the following types, depending on the property: String, Double, Integer, Boolean or DateTime. |
Methods
Name |
Description |
---|---|
Clears all properties contained in the DocumentProperties object, removing them from the workbook's Properties sheet. | |
Returns the value of the custom property for the specified key. The return value can be of the following types, depending on the property: String, Double, Integer, Boolean or DateTime. (To create a custom property, use DocumentProperties.SetCustomProperty.) | |
Restores document properties values to the default set of properties and clears all others. The default set of properties are Application, CreationDate, and LastSavedDate. | |
Use SetCustomProperty to create a custom document property. Pass the method the name and value of the property. The value can be one of the following types, depending on the property: String, Double, Integer, Boolean, or DateTime. |
Nested Classes
Name |
Description |
---|---|
DocumentProperties.BuiltIn contains a set of built-in document property fields. |