View | Details | Raw Unified | Return to bug 57071
Collapse All | Expand All

(-)a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java (-3 / +2 lines)
Lines 295-302 public class XSSFPivotTable extends POIXMLDocumentPart { Link Here
295
        addDataColumn(columnIndex, true);
295
        addDataColumn(columnIndex, true);
296
        addDataField(function, columnIndex);
296
        addDataField(function, columnIndex);
297
297
298
        //Only add colfield if there is already one.
298
        //colfield should be added for the second one.
299
        if (pivotTableDefinition.getDataFields().getCount() > 1) {
299
        if (pivotTableDefinition.getDataFields().getCount() == 2) {
300
            CTColFields colFields;
300
            CTColFields colFields;
301
            if(pivotTableDefinition.getColFields() != null) {
301
            if(pivotTableDefinition.getColFields() != null) {
302
                colFields = pivotTableDefinition.getColFields();
302
                colFields = pivotTableDefinition.getColFields();
303
- 

Return to bug 57071