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

Added option to skip hidden rows #107

Closed pczajkowski-ptw closed 2 years ago

pczajkowski-ptw commented 2 years ago

Moved from master as requested.

Great project, I'm using it a lot! I've noticed that there's an option to skip blank rows (SkipBlankRows), but no option to skip rows which were hidden. It would help me greatly with my projects if such option would be available, so I've taken a liberty to add SkipHiddenRows. I've also modified private IEnumerable<RowInfo<T>> Take<T>(Func<ICell, Type> getColumnType, ISheet sheet, int maxErrorRows, Func<T> objectInitializer = null) accordingly and added two tests (Take_SkipHiddenRows_True and Take_SkipHiddenRows_False).

Hope you'll find it useful and would decide to merge it into your project.