mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +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 】 StrUtil增加firstNonXXX方法(issue#1020@Github)
|
||||||
* 【core 】 BeanCopier修改规则,可选bean拷贝空字段报错问题(pr#160@Gitee)
|
* 【core 】 BeanCopier修改规则,可选bean拷贝空字段报错问题(pr#160@Gitee)
|
||||||
|
|
||||||
### Bug修复#
|
### 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.Row;
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
@ -415,7 +416,7 @@ public class ExcelBase<T extends ExcelBase<T>> implements Closeable {
|
|||||||
* @since 4.6.2
|
* @since 4.6.2
|
||||||
*/
|
*/
|
||||||
public boolean isXlsx() {
|
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: // 数字类型
|
case NumberRecord.sid: // 数字类型
|
||||||
final NumberRecord numrec = (NumberRecord) record;
|
final NumberRecord numrec = (NumberRecord) record;
|
||||||
final String formatString = formatListener.getFormatString(numrec);
|
final String formatString = formatListener.getFormatString(numrec);
|
||||||
if (formatString.contains(StrUtil.DOT)) {
|
if (StrUtil.contains(formatString, StrUtil.DOT)) {
|
||||||
//浮点数
|
//浮点数
|
||||||
value = numrec.getValue();
|
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());
|
value = ExcelSaxUtil.getDateValue(numrec.getValue());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user