Bug 57071 - [PATCH] addColumnLabel works only 2 times
Summary: [PATCH] addColumnLabel works only 2 times
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.11-dev
Hardware: PC All
: P2 critical with 7 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2014-10-09 08:58 UTC by jakob.mandalka
Modified: 2014-12-21 06:20 UTC (History)
1 user (show)

Fix for bug 57071 (1.09 KB, patch)
2014-12-19 20:48 UTC, Kamil Linek
Details | Diff
unit tests to the patch (3.29 KB, patch)
2014-12-20 13:24 UTC, Kamil Linek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.


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.