@@ -85,17 +85,17 @@ https://oss.sonatype.org/content/groups/public/ | |||||
<dependency> | <dependency> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi-base</artifactId> | <artifactId>easypoi-base</artifactId> | ||||
<version>3.1.0</version> | |||||
<version>3.2.0</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi-web</artifactId> | <artifactId>easypoi-web</artifactId> | ||||
<version>3.1.0</version> | |||||
<version>3.2.0</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi-annotation</artifactId> | <artifactId>easypoi-annotation</artifactId> | ||||
<version>3.1.0</version> | |||||
<version>3.2.0</version> | |||||
</dependency> | </dependency> | ||||
``` | ``` | ||||
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>3.1.1-SNAPSHOT</version> | |||||
<version>3.2.0</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-annotation</artifactId> | <artifactId>easypoi-annotation</artifactId> | ||||
<description>基础注解类,解耦合</description> | <description>基础注解类,解耦合</description> |
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>3.1.1-SNAPSHOT</version> | |||||
<version>3.2.0</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-base</artifactId> | <artifactId>easypoi-base</artifactId> | ||||
<dependencies> | <dependencies> | ||||
@@ -589,7 +589,7 @@ public final class ExcelExportOfTemplateUtil extends BaseExportService { | |||||
templateSumHandler.addValueOfKey(params.getName(), val); | templateSumHandler.addValueOfKey(params.getName(), val); | ||||
} | } | ||||
//如果合并单元格,就把这个单元格的样式和之前的保持一致 | //如果合并单元格,就把这个单元格的样式和之前的保持一致 | ||||
setMergedRegionStyle(row, ci, columns.get(i)); | |||||
setMergedRegionStyle(row, ci, params); | |||||
//合并对应单元格 | //合并对应单元格 | ||||
if ((params.getRowspan() != 1 || params.getColspan() != 1) | if ((params.getRowspan() != 1 || params.getColspan() != 1) | ||||
&& !mergedRegionHelper.isMergedRegion(row.getRowNum() + 1, ci)) { | && !mergedRegionHelper.isMergedRegion(row.getRowNum() + 1, ci)) { | ||||
@@ -663,19 +663,19 @@ public final class ExcelExportOfTemplateUtil extends BaseExportService { | |||||
} | } | ||||
String cellStringString; | String cellStringString; | ||||
try {//不允许为空 便利单元格必须有结尾和值 | try {//不允许为空 便利单元格必须有结尾和值 | ||||
cellStringString = cell.getStringCellValue(); | |||||
if (StringUtils.isBlank(cellStringString) && colspan + startIndex <= index) { | |||||
throw new ExcelExportException("for each 当中存在空字符串,请检查模板"); | |||||
} else if (StringUtils.isBlank(cellStringString) | |||||
&& colspan + startIndex > index) { | |||||
//读取是判断,跳过,数据为空,但是不是第一次读这一列,所以可以跳过 | |||||
columns.add(new ExcelForEachParams(null, cell.getCellStyle(), (short) 0)); | |||||
continue; | |||||
} | |||||
} catch (Exception e) { | |||||
throw new ExcelExportException(ExcelExportEnum.TEMPLATE_ERROR, e); | |||||
cellStringString = cell.getStringCellValue(); | |||||
if (StringUtils.isBlank(cellStringString) && colspan + startIndex <= index) { | |||||
throw new ExcelExportException("for each 当中存在空字符串,请检查模板"); | |||||
} else if (StringUtils.isBlank(cellStringString) | |||||
&& colspan + startIndex > index) { | |||||
//读取是判断,跳过,数据为空,但是不是第一次读这一列,所以可以跳过 | |||||
columns.add(new ExcelForEachParams(null, cell.getCellStyle(), (short) 0)); | |||||
continue; | |||||
} | } | ||||
//把读取过的cell 置为空 | |||||
} catch (Exception e) { | |||||
throw new ExcelExportException(ExcelExportEnum.TEMPLATE_ERROR, e); | |||||
} | |||||
//把读取过的cell 置为空 | |||||
cell.setCellValue(""); | cell.setCellValue(""); | ||||
if (cellStringString.contains(END_STR)) { | if (cellStringString.contains(END_STR)) { | ||||
columns.add(getExcelTemplateParams(cellStringString.replace(END_STR, EMPTY), | columns.add(getExcelTemplateParams(cellStringString.replace(END_STR, EMPTY), | ||||
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>3.1.1-SNAPSHOT</version> | |||||
<version>3.2.0</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-web</artifactId> | <artifactId>easypoi-web</artifactId> | ||||
<dependencies> | <dependencies> | ||||
@@ -2,6 +2,11 @@ | |||||
-------------------------- | -------------------------- | ||||
版本修改 | 版本修改 | ||||
-------------------------- | -------------------------- | ||||
- 3.2.0 速度升级吧,上个版本这么坑 | |||||
- 修复坑爹bug | |||||
- 自定义枚举支持 | |||||
- 获取rownum | |||||
- 其他小问题 | |||||
- 3.1.0 handler改名字非兼容!!!谨慎 | - 3.1.0 handler改名字非兼容!!!谨慎 | ||||
- 修改Server改为service | - 修改Server改为service | ||||
- 修改hanlder改为handler | - 修改hanlder改为handler | ||||
@@ -3,7 +3,7 @@ | |||||
<modelVersion>4.0.0</modelVersion> | <modelVersion>4.0.0</modelVersion> | ||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>3.1.1-SNAPSHOT</version> | |||||
<version>3.2.0</version> | |||||
<packaging>pom</packaging> | <packaging>pom</packaging> | ||||
<name>easypoi</name> | <name>easypoi</name> | ||||
<modules> | <modules> | ||||
@@ -45,7 +45,7 @@ | |||||
</organization> | </organization> | ||||
<properties> | <properties> | ||||
<sub.version>3.1.1-SNAPSHOT</sub.version> | |||||
<sub.version>3.2.0</sub.version> | |||||
<poi.version>3.15</poi.version> | <poi.version>3.15</poi.version> | ||||
<xerces.version>2.9.1</xerces.version> | <xerces.version>2.9.1</xerces.version> | ||||
<guava.version>16.0.1</guava.version> | <guava.version>16.0.1</guava.version> | ||||