Browse Source

修复不自动行高的问题 [Issue #1869]

pull/2077/head
Jiaju Zhuang 3 years ago
parent
commit
6351fe2c18
  1. 4
      src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java
  2. 2
      src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java

4
src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java

@ -28,7 +28,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.hssf.usermodel.PoiHssfUtils; import org.apache.poi.hssf.usermodel.PoiUtils;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellType;
@ -354,7 +354,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
return; return;
} }
// fix https://github.com/alibaba/easyexcel/issues/1869 // fix https://github.com/alibaba/easyexcel/issues/1869
if (isOriginalCell && PoiHssfUtils.customHeight(row)) { if (isOriginalCell && PoiUtils.customHeight(row)) {
collectionRowHeightCache.put(currentUniqueDataFlag, row.getHeight()); collectionRowHeightCache.put(currentUniqueDataFlag, row.getHeight());
return; return;
} }

2
src/main/java/org/apache/poi/hssf/usermodel/PoiHssfUtils.java → src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java

@ -10,7 +10,7 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
* *
* @author Jiaju Zhuang * @author Jiaju Zhuang
*/ */
public class PoiHssfUtils { public class PoiUtils {
/** /**
* Whether to customize the height * Whether to customize the height
Loading…
Cancel
Save