LinqToExcel icon indicating copy to clipboard operation
LinqToExcel copied to clipboard

Stream results

Open anishpateluk opened this issue 10 years ago • 2 comments

Is it possible to have the implementation returns each row using yield rather than filling a List<T> in memory and returning that?

This would really help me out as I am working with very large excel files.

anishpateluk avatar Sep 01 '14 12:09 anishpateluk

I've been tinkering with streaming in my laziness branch over here.

You can set Lazy to true on ExcelQueryFactory in order to bypass the default behavior, which used ToList() to bring everything into memory.

I haven't yet put together a PR because I'll want to build some tests around it, but preliminary ad-hoc testing seems ok.

Comments and suggestions are welcome!

freakingawesome avatar Jul 20 '18 14:07 freakingawesome

I've had success running my laziness experiment for a few months, so I've opened a PR here: https://github.com/paulyoder/LinqToExcel/pull/155

freakingawesome avatar Oct 07 '18 12:10 freakingawesome