JanKallman / EPPlus

Create advanced Excel spreadsheets using .NET
3.76k stars 1.18k forks source link

Feature Request: Adding XML metadata to Excel files #82

Open mcsantiago opened 6 years ago

mcsantiago commented 6 years ago

I am writing an application that requires exporting data to an excel file (and later re-importing that data after some changes). However, the way the excel file is generated does not guarantee a set amount of columns, depending on what is being exported. To remedy this, I intend on adding metadata (possibly by injecting XML metadata) to the excel file itself, hidden from the user, so I know what to expect upon import.

I have checked the documentation and found no current method of adding this but have found a possible solution proposed by MSDN's website: https://msdn.microsoft.com/en-us/library/microsoft.office.core.customxmlpart.aspx

I do not know if there is a way of accomplishing this with the current version of EPPlus, although I have not examined the code base in detail just yet. Until then, I'll just mark this as a feature request!

programcsharp commented 5 years ago

You can do this via package.Workbook.Properties -- there is the built-in metadata, custom properties, and extended properties XML you can use there.