Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to iterate over all sheets #16

Closed
Schattensilber opened this issue Nov 2, 2015 · 5 comments
Closed

Way to iterate over all sheets #16

Schattensilber opened this issue Nov 2, 2015 · 5 comments

Comments

@Schattensilber
Copy link

As it stands (and as I understand it) this tool is not useful for reading in a multi sheet workbook with an unknown number of sheets.
Is it possible to include a method to change that? Ideally getAllSheetNames(), but also getNumberOfSheets() or hasSheet(int index) would enable iterating over all sheets.

@monitorjbl
Copy link
Owner

I think this is a good idea, but would require a compatibility-breaking refactor of the current codebase to do properly because I don't want to just bolt this on. Rather than StreamingReader being like the Sheet and giving you Rows it would be the Workbook and you'd get Sheets out of it.

Does that work for you?

@Schattensilber
Copy link
Author

Sounds great, this way it would be even closer to the XSSFWorkbook structure, but with sheet iteration. For my purposes it would be important to get the sheet names. If that's all in then this could go into POI as the SXSSF sidekick for reading :)

@osevce
Copy link

osevce commented Nov 23, 2015

+1 for supporting multi sheet workbooks, would be very useful

@monitorjbl
Copy link
Owner

@endriju @Schattensilber There is an implementation available in the 0.3 branch that allows you to stream an entire workbook with all of its sheets. I'm trying to keep it backwards-compatible, so apologies if the options are a little confusing at the moment. I'll give it another pass soon to clean things up.

monitorjbl added a commit that referenced this issue Mar 1, 2016
monitorjbl added a commit that referenced this issue Mar 1, 2016
@monitorjbl monitorjbl mentioned this issue Apr 24, 2016
@monitorjbl
Copy link
Owner

This has been added to mainline codebase and is now available in version 1.0.0 from Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants