rubyXL icon indicating copy to clipboard operation
rubyXL copied to clipboard

Only parse specific sheets in a workbook?

Open btrepp opened this issue 11 years ago • 3 comments

I'm wanting to extract data out of a certain sheet in a workbook. The gem seems to process everything into memory. Some of the other sheets can be quite large.

Is there a way to tell the gem to only parse a certain sheet I am interested in?.

btrepp avatar Jan 07 '15 03:01 btrepp

So far it is not possible, although I believe it can be implemented (although in that case the spreadsheet will become read-only, and it will not be possible to save it). Can you propose an API for that functionality?

weshatheleopard avatar Jan 07 '15 05:01 weshatheleopard

Off the top of my head the same API etc would be cool, but perhaps just lazily evaluated?.

Eg returning the same workbook but only accessing the sheets when called?. :)

btrepp avatar Jan 07 '15 05:01 btrepp

Lazy loading will require significant effort to implement. So far the only reasonable approach I see is skip parsing the sheet once we see it's not the one we want.

weshatheleopard avatar Jan 07 '15 05:01 weshatheleopard