https://bz.apache.org/bugzilla/show_bug.cgi?id=60786
Bug ID: 60786 Summary: Keeping the first rows of an SXSSFSheet in memory for createing pivot table Product: POI Version: 3.16-dev Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: SXSSF Assignee: dev@poi.apache.org Reporter: benko.att...@freemail.hu Target Milestone: --- Created attachment 34785 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34785&action=edit Patch containing modifications of SXSSFSheet and SXSSFWorkbook Hello, Actually if you want to create a pivot table from data stored in a large SXSSFSheet (too large for XSSFSheet) you will get an exception, because row containing pivot header is vanished from memory, you can't access it. With this patch first rows are kept in memory permanently, so creating pivot table won't cause exception anymore. I'v added a new constructor to SXSSFWorkbook which will activate this behaviour. public SXSSFWorkbook(int rowAccessWindowSize, int rowAccessFixedTop) Second parameter determine how many rows will be kept in memory at the top of the table. The pivot header should be in this area. Example: if your header in the 10th row, than you should call constructor with rowAccessFixedTop >= 10 to keep it in memory for pivot table creation. I hope it's useful for anybody else too. Regards, Attila -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org