Bug 57071

Summary: [PATCH] addColumnLabel works only 2 times
Product: POI Reporter: jakob.mandalka
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical CC: itprrr
Priority: P2 Keywords: PatchAvailable
Version: 3.11-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Fix for bug 57071
unit tests to the patch

Description jakob.mandalka 2014-10-09 08:58:33 UTC
If I add more than 2 ColumnLabel fields to my Pivot, the Excel which will be created is not valid anymore.

Just 2 column labels are fine, if you need more you cant add them.

Example:

pivotTable.addColumnLabel(DataConsolidateFunction.SUM, 4);
pivotTable.addColumnLabel(DataConsolidateFunction.SUM, 5);
pivotTable.addColumnLabel(DataConsolidateFunction.COUNT, 7);
pivotTable.addColumnLabel(DataConsolidateFunction.COUNT, 8);

Does not work.

If you pick just 2 of the, it works.
Comment 1 Kamil Linek 2014-12-19 20:48:14 UTC
Created attachment 32310 [details]
Fix for bug 57071
Comment 2 Nick Burch 2014-12-20 01:16:13 UTC
Thanks for that Kamil!

Any chance of a small unit test to go with the patch? That'll let us verify that the fix has worked, as well as ensuring it stays fixed into the future!
Comment 3 Kamil Linek 2014-12-20 13:24:15 UTC
Created attachment 32312 [details]
unit tests to the patch
Comment 4 Nick Burch 2014-12-21 06:20:19 UTC
Thanks, patch and test applied in r1647088.