paulyoder / LinqToExcel

Use LINQ to retrieve data from spreadsheets and csv files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skip (trailing) empty lines

git-hub-user opened this issue · comments

Excel has a memory of which cell is de most lower right cell in use (which it jumps to when you type Ctrl-End). If you have removed lines from you document, this cell may be down far below the last line containing any values.
When using LinkToExcel, the underlying provider will return lines up to the one containing the last cell.
I can of course check if any of the cells contain data, but it would help me if I had a setting for this on the ExcelQueryFactory object. Something like bool SkipEmptyLines. It would be OK for me to also skip empty lines in the middle of the data set.

Agree. I also have situations where in the middle of file I get some sort of summary info instead of data. It would be great to have opportunity process such 'invalid' rows somehow.

Implemented by #177.