2
我在网上搜索了很多,但无法找到错误的解决方案。数据透视表中列数相同的列索引
代码
AreaReference areaRef = new AreaReference("A1:T"+ sheet.getLastRowNum());
CellReference cellRef = new CellReference("A2");
XSSFPivotTable pivotTable = summarysheet.createPivotTable(areaRef,cellRef,sheet);
pivotTable.addRowLabel(19);
pivotTable.addColumnLabel(DataConsolidateFunction.COUNT, 19);
问题:我尝试添加RowLabel对指数19,并且还试图计算列19
我运行后,它显示了一个错误的文件已损坏。但是,当我更改addColumnLabel中的索引。有用。
任何意见或建议将不胜感激。