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.

[DefaultMember("Item")]
 public sealed class DocumentProperties
<DefaultMember("Item")> _
	Public NotInheritable Class DocumentProperties

To return a DocumentProperties object, use Workbook.DocumentProperties.


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          DocumentProperties docProps = wb.DocumentProperties;
        

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim docProps = wb.DocumentProperties
        

Name

Description

Application

Author

Category

Comments

Company

CreationDate

Keywords

LastSavedDate

Manager

Title

Name

Description

Item(DocumentProperties.BuiltIn)

Item(String)

Name

Description

Clear()

GetCustomProperty(String)

RestoreDefaults()

SetCustomProperty(String, Object)

Name

Description

BuiltIn