mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -187,7 +187,7 @@ public class ExcelSaxUtil {
|
||||
try {
|
||||
xmlReader = XMLHelper.newXMLReader();
|
||||
} catch (final SAXException | ParserConfigurationException e) {
|
||||
if (e.getMessage().contains("org.mina.xerces.parsers.SAXParser")) {
|
||||
if (e.getMessage().contains("org.apache.xerces.parsers.SAXParser")) {
|
||||
throw new DependencyException(e, "You need to add 'xerces:xercesImpl' to your project and version >= 2.11.0");
|
||||
} else {
|
||||
throw new POIException(e);
|
||||
|
@@ -12,11 +12,12 @@
|
||||
|
||||
package org.dromara.hutool.poi.excel;
|
||||
|
||||
import org.dromara.hutool.poi.excel.cell.values.NumericCellValue;
|
||||
import java.util.Date;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.dromara.hutool.poi.excel.cell.values.NumericCellValue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class NumericCellValueTest {
|
||||
|
||||
@Test
|
||||
@@ -25,7 +26,7 @@ public class NumericCellValueTest {
|
||||
final ExcelWriter writer = ExcelUtil.getWriter("1899bug_write.xlsx");
|
||||
final Cell cell = reader.getCell(0, 0);
|
||||
// 直接取值
|
||||
// 和CellUtil.getCellValue(org.mina.poi.ss.usermodel.Cell)方法的结果一样
|
||||
// 和CellUtil.getCellValue(org.apache.poi.ss.usermodel.Cell)方法的结果一样
|
||||
// 1899-12-31 04:39:00
|
||||
final Date cellValue = cell.getDateCellValue();
|
||||
// 将这个值写入EXCEL中自定义样式的单元格,结果会是-1
|
||||
|
Reference in New Issue
Block a user