jameskleeh / groovy-excel-builder

A Groovy DSL for Building Excel Files
Apache License 2.0
46 stars 14 forks source link

Switched POI APIs to SXSSF (Streaming XSSF) #22

Closed tobia closed 5 years ago

tobia commented 6 years ago

Here is a PR with the minimal code changes needed use SXSSF (see https://github.com/jameskleeh/groovy-excel-builder/issues/21)

It works well and indeed uses less memory than the XSSF version, as well as being able to produce larger files much faster.

I haven't built it nor tested it with the Gradle build system of this repository, because I can't get it to work for some reason. (In fact, Travis fails too.) But the code builds and works well in my own project, using the same dependencies you have in your build.gradle

tobia commented 6 years ago

Also, wb.dispose() should really be in a try/finally, but it would require the entire code inside build() to be in try/finally too, so I'd rather leave that refactoring to you.

jameskleeh commented 6 years ago

This should be an opt in feature. I think by default we should pass -1 to the workbook constructor so it behaves exactly the same as it does today. We can add a way for users to specify they want x window size

jameskleeh commented 5 years ago

I had forgotten about this PR and did the work myself ... :(