mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-30 12:47:58 +08:00
fix bug
This commit is contained in:
parent
1c4c69cfe8
commit
c9a7340bbd
@ -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)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user