vvenegasv / exportable

Exportable is a component for .NET, 100% open source, with MIT license; builded on top of NPOI. In the future, are plans to handle other formats, like CSV, Json, and others.
MIT License
9 stars 5 forks source link

[Feature] As Header could be good have the way to add two (or more?) rows as header even merged #4

Open portal7 opened 5 years ago

portal7 commented 5 years ago

Thinking in cases when an Excel Sheet has two lines of Header (Header ---merged cells --- and SubHeader as a column name) would be nice.

For Reference: https://stackoverflow.com/questions/28143102/exporting-data-to-excel-using-npoi-in-c-sharp/33813474#33813474

(Second example Datasource -> Excel)

vvenegasv commented 5 years ago

I think this user case is satisfied. For example, in the importable excel header, you can set the first row with data, You can try with this:

[ImportableExcelHeader("my-sheet-name", 3)] public class MyClass { //some properties }

You can look more in this file https://github.com/vvenegasv/exportable/blob/master/src/Exportable/Attribute/ImportableExcelHeaderAttribute.cs

Please let me know if this resolve your requirement Best Regards