Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Expand]Visual Elements
    Services
   [Expand]Shortcuts
   [Collapse]Examples
    [Expand]Files
    [Collapse]Workbooks
      How to: Access a Workbook
      How to: Create a New Workbook
      How to: Update External References in the Loaded Workbook
      How to: Clone a Workbook
      How to: Specify Document Properties
      How to: Merge Multiple Workbooks Into One Document
    [Expand]Worksheets
    [Expand]Rows and Columns
    [Expand]Cells
    [Expand]Formulas
    [Expand]Import and Export Data
    [Expand]Data Binding
    [Expand]Mail Merge
    [Expand]Formatting Cells
    [Expand]Conditional Formatting
    [Expand]Group Data
    [Expand]Filter Data
    [Expand]Tables
    [Expand]Pivot Tables
    [Expand]Printing
    [Expand]Pictures
    [Expand]Charts
    [Expand]Protection
    [Expand]Customization
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Specify Document Properties

The SpreadsheetControl allows you to set and edit the document properties (metadata) associated and stored with a workbook. To specify the standard document properties (such as DocumentProperties.Title, DocumentProperties.Author, DocumentProperties.Subject, DocumentProperties.Description etc.), use the IWorkbook.DocumentProperties property, which provides access to the DocumentProperties object, containing basic information about a workbook. Note that some of these properties are updated automatically when a document is created (DocumentProperties.Author, DocumentProperties.Created), last modified and saved (DocumentProperties.LastModifiedBy, DocumentProperties.Modified), or printed (DocumentProperties.Printed).

You can also create your own custom document properties by using the DocumentProperties.Custom property.

Expanded Built-In Properties

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4832.

The example below demonstrates how to specify the standard document properties for a workbook using the IWorkbook.DocumentProperties property.

Expanded Custom Properties

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4832.

The example below demonstrates how to define the custom document properties for a workbook. Use the DocumentProperties.Custom property to get access to a storage of all user-defined properties specified in a document. To set an individual custom property with the specified name, use the DocumentCustomProperties.Item property.

Use the DocumentCustomProperties.LinkToContent property to associate the desired custom document property to the cell or cell range content, as shown on the code snippet below.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4832.

To remove all the custom document properties from a workbook, use the DocumentCustomProperties.Clear method.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4832.

The example below demonstrates how to remove all the custom document properties from a workbook.

How would you rate this topic?​​​​​​​