ExcelMapper icon indicating copy to clipboard operation
ExcelMapper copied to clipboard

Min/MaxRowNumber wrong index

Open DanielSanIT opened this issue 4 years ago • 5 comments

I am trying to read specific rows. Rows that I specified in ExcelMapper has different from actual Excel file rows. I set MinRowNumber = 9, MaxRowNumber = 19, but the library has returned rows from 10 to 20

DanielSanIT avatar Feb 15 '21 23:02 DanielSanIT

Is there, by chance, a filter applied in your excel file?

archerbird avatar Feb 15 '21 23:02 archerbird

Is there, by chance, a filter applied in your excel file?

There is no a filter. I tried it on clean excel - same problem. Maybe it related to "HeaderRow = false"? I am just trying to reed data from row 10 to 20

DanielSanIT avatar Feb 16 '21 09:02 DanielSanIT

Can't verify right now but I think row numbers start at 0 in ExcelMapper while they start at 1 in Excel.

mganss avatar Feb 16 '21 10:02 mganss

Ok then it will be a good issue to make 1 based index in ExcelMapper to be similar with Excel.

DanielSanIT avatar Feb 16 '21 10:02 DanielSanIT

I'll leave it this way for now as this would be a major breaking change. POI also uses 0-based row numbering. ExcelMapper is admittedly inconsistent as column numbers are 1-based.

mganss avatar Feb 16 '21 17:02 mganss