Browse Source

Merge pull request #6013 in CORE/base-third from final/11.0 to persist/11.0

* commit '14eb90a23c8fd6eef259cac29f63591153b08009':
  BI-105913 BI导出变慢,按照10.0修改的方法改一下
  BI-105913 BI导出性能问题,valueof的性能比较低,大数据量会比较慢,这是之前10.0定制的内容,修改一下
  REPORT-71241 大数据集导出变慢
persist/11.0
superman 2 years ago
parent
commit
6ea8e142b8
  1. 11
      fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/usermodel/XSSFSheet.java

11
fine-poi/src/main/java/com/fr/third/v2/org/apache/poi/xssf/usermodel/XSSFSheet.java

@ -174,6 +174,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
private SortedMap<String,XSSFTable> tables; private SortedMap<String,XSSFTable> tables;
private List<CellRangeAddress> arrayFormulas; private List<CellRangeAddress> arrayFormulas;
private XSSFDataValidationHelper dataValidationHelper; private XSSFDataValidationHelper dataValidationHelper;
private int size;
/** /**
* Creates new XSSFSheet - called by XSSFWorkbook to create a sheet from scratch. * Creates new XSSFSheet - called by XSSFWorkbook to create a sheet from scratch.
@ -408,21 +409,13 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
// throw IllegalStateException if the argument CellRangeAddress intersects with // throw IllegalStateException if the argument CellRangeAddress intersects with
// a multi-cell array formula defined in this sheet // a multi-cell array formula defined in this sheet
validateArrayFormulas(region); validateArrayFormulas(region);
// Throw IllegalStateException if the argument CellRangeAddress intersects with
// a merged region already in this sheet
validateMergedRegions(region);
} }
CTMergeCells ctMergeCells = worksheet.isSetMergeCells() ? worksheet.getMergeCells() : worksheet.addNewMergeCells(); CTMergeCells ctMergeCells = worksheet.isSetMergeCells() ? worksheet.getMergeCells() : worksheet.addNewMergeCells();
CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell(); CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell();
ctMergeCell.setRef(region.formatAsString()); ctMergeCell.setRef(region.formatAsString());
final int numMergeRegions=ctMergeCells.sizeOfMergeCellArray();
// also adjust the number of merged regions overall
ctMergeCells.setCount(numMergeRegions);
return numMergeRegions-1; return ++this.size;
} }
/** /**

Loading…
Cancel
Save