This commit is contained in:
Looly 2020-08-20 16:27:33 +08:00
parent 1c4c69cfe8
commit c9a7340bbd
3 changed files with 8 additions and 4 deletions

View File

@ -3,12 +3,15 @@
-------------------------------------------------------------------------------------------------------------
# 5.4.1 (2020-08-19)
# 5.4.1 (2020-08-20)
### 新特性
* 【core 】 StrUtil增加firstNonXXX方法issue#1020@Github
* 【core 】 BeanCopier修改规则可选bean拷贝空字段报错问题pr#160@Gitee
### Bug修复#
* 【poi 】 修复ExcelBase.isXlsx方法判断问题issue#I1S502@Gitee
* 【poi 】 修复Excel03SaxReader日期方法判断问题pr#1026@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -10,6 +10,7 @@ import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import java.io.Closeable;
@ -415,7 +416,7 @@ public class ExcelBase<T extends ExcelBase<T>> implements Closeable {
* @since 4.6.2
*/
public boolean isXlsx() {
return this.sheet instanceof XSSFSheet;
return this.sheet instanceof XSSFSheet || this.sheet instanceof SXSSFSheet;
}
/**

View File

@ -294,10 +294,10 @@ public class Excel03SaxReader extends AbstractExcelSaxReader<Excel03SaxReader> i
case NumberRecord.sid: // 数字类型
final NumberRecord numrec = (NumberRecord) record;
final String formatString = formatListener.getFormatString(numrec);
if (formatString.contains(StrUtil.DOT)) {
if (StrUtil.contains(formatString, StrUtil.DOT)) {
//浮点数
value = numrec.getValue();
} else if (formatString.contains(StrUtil.SLASH) || formatString.contains(StrUtil.COLON)) {
} else if (StrUtil.containsAny(formatString, StrUtil.SLASH, StrUtil.COLON, "", "", "", "", "", "")) {
//日期
value = ExcelSaxUtil.getDateValue(numrec.getValue());
} else {