donnytian / Npoi.Mapper

Use this tool to import or export data with Excel file. The tool is a convention based mapper between strong typed object and Excel data via NPOI.
MIT License
589 stars 114 forks source link

Is there a way to auto detect header row and data rows? #112

Open devkincaid opened 1 year ago

devkincaid commented 1 year ago

Imagine I have the possibility for random excel rows above and below the actual data rows and header. Basically find rows with the most same number of cells. That's the stuff you are trying to import. The first column in that set would be header row.

This is useful for excel imports that have required header or footer rows that have nothing to do with the data. It would also allow more flexibility without forcing the user into using a template.

donnytian commented 1 year ago

I don't have any idea about how to auto-detect header row and date rows. We already have a setting to specify header row number. Maybe we can have another to specify the range of data rows?