Set Excel Properties in C#, VB.NET

Excel Properties, which can be taken as metadata, present details of one file, including title, author, subject etc. Users can change properties according to data information, for example, adding key words or category for the file. But some properties are read-only, such as file size, created date, location and so on.

Spire.XLS for .NET, a professional component to manipulate Excel files, enables users to set Excel properties by using C#, VB.NET. This guide focuses on introducing method to set properties for Excel file.

Set Excel Properties

Users can set DocumentProperties property of Workbook class to change Excel properties as they want. The following screenshot shows properties after changing. Download and install Spire.XLS for .NET and use the following code to set Excel properties.

workbook.DocumentProperties.Author = "E-iceblue Support Team";
workbook.DocumentProperties.Title = "Excel Properties";
workbook.DocumentProperties.Keywords = "Excel Properties C#, Excel Properties VB.NET";
workbook.DocumentProperties.Category = "Excel Demo";
workbook.DocumentProperties.Company = "E-iceblue";
workbook.DocumentProperties.Author = "E-iceblue Support Team"
workbook.DocumentProperties.Title = "Excel Properties"
workbook.DocumentProperties.Keywords = "Excel Properties C#, Excel Properties VB.NET"
workbook.DocumentProperties.Category = "Excel Demo"
workbook.DocumentProperties.Company = "E-iceblue"