Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Workbook Properties

Francois Botha edited this page Feb 26, 2018 · 3 revisions
var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("Workbook Properties");

Predefined Properties:

WorkbookProperties.jpg

wb.Properties.Author = "theAuthor";
wb.Properties.Title = "theTitle";
wb.Properties.Subject = "theSubject";
wb.Properties.Category = "theCategory";
wb.Properties.Keywords = "theKeywords";
wb.Properties.Comments = "theComments";
wb.Properties.Status = "theStatus";
wb.Properties.LastModifiedBy = "theLastModifiedBy";
wb.Properties.Company = "theCompany";
wb.Properties.Manager = "theManager";

Custom Properties:

WorkbookProperties1.jpg

wb.CustomProperties.Add("theText", "XXX");
wb.CustomProperties.Add("theDate", new DateTime(2011, 1, 1));
wb.CustomProperties.Add("theNumber", 123.456);
wb.CustomProperties.Add("theBoolean", true);

Save Workbook:

wb.SaveAs("WorkbookProperties.xlsx");

FAQ

Examples

Real world scenarios

Time Savers

Performance and Memory

Misc

Inserting Data/Tables

Styles

Ranges

Rows

Columns

Page Setup (Print Options)

AutoFilters

Comments

Dev docs

Clone this wiki locally