This commit is contained in:
lxyer 2019-05-15 15:52:13 +08:00
parent 89a70768c4
commit 352c00e6cf

View File

@ -1,14 +1,11 @@
package net.tccn.kit.poi; package net.tccn.kit.poi;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.OfficeXmlFileException; import org.apache.poi.poifs.filesystem.OfficeXmlFileException;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -382,7 +379,8 @@ public class ExcelKit {
} }
private static Workbook getWorkbook(File file) throws IOException { private static Workbook getWorkbook(File file) throws IOException {
Workbook wk; return WorkbookFactory.create(file);
/*Workbook wk;
FileInputStream fis = new FileInputStream(file); FileInputStream fis = new FileInputStream(file);
try { try {
wk = new HSSFWorkbook(fis);//if excel version 2007+ will throws OfficeXmlFileException wk = new HSSFWorkbook(fis);//if excel version 2007+ will throws OfficeXmlFileException
@ -398,7 +396,7 @@ public class ExcelKit {
} }
} }
return wk; return wk;*/
} }
//dev //dev