How to Edit Workbook Metadata
IronXL library has the ability to edit workbook metadata without using Office Interop. Metadata can be used to describe or identify the workbook. When working with many spreadsheet files, the metadata information can also be used to categorize spreadsheet and making it more manageable.
How to Edit Workbook Metadata
- Download C# library to edit workbook metadata
- Load existing spreadsheet or create a branch new one
- Access and modify metadata information with Metadata property
- Export the edited Spreadsheet

Install with NuGet
Install-Package IronXL.Excel
Edit Workbook Metadata Example
To add custom author name to spreadsheet file set the Author
property with the desired string of data. For example, workBook.Metadata.Author = "Your Name"
. The meta-data properties available in Metadata
property of WorkBook
can be accessed and retrieved.
:path=/static-assets/excel/content-code-examples/how-to/edit-workbook-metadata.cs
using IronXL;
using System;
WorkBook workBook = WorkBook.Load("sample.xlsx");
// Set author
workBook.Metadata.Author = "Your Name";
// Set comments
workBook.Metadata.Comments = "Monthly report";
// Set title
workBook.Metadata.Title = "July";
// Set keywords
workBook.Metadata.Keywords = "Report";
// Read the creation date of the excel file
DateTime? creationDate = workBook.Metadata.Created;
// Read the last printed date of the excel file
DateTime? printDate = workBook.Metadata.LastPrinted;
workBook.SaveAs("editedMetadata.xlsx");
Imports IronXL
Imports System
Private workBook As WorkBook = WorkBook.Load("sample.xlsx")
' Set author
workBook.Metadata.Author = "Your Name"
' Set comments
workBook.Metadata.Comments = "Monthly report"
' Set title
workBook.Metadata.Title = "July"
' Set keywords
workBook.Metadata.Keywords = "Report"
' Read the creation date of the excel file
Dim creationDate? As DateTime = workBook.Metadata.Created
' Read the last printed date of the excel file
Dim printDate? As DateTime = workBook.Metadata.LastPrinted
workBook.SaveAs("editedMetadata.xlsx")

Accessible Metadata Fields
Not all metadata property can be edited or changed. Some of the property can only be retrieved. Below are the lists of available properties:
Set, modified, and retrieve
- Author
- Comments
- LastPrinted
- Keywords and Category
- Created and ModifiedDate
- Subject and Title
Retrieve only
- ApplicationName
- CustomProperties
- Company
- Manager
- Template