|
|
|
@ -1,23 +1,14 @@
|
|
|
|
|
package com.alibaba.easyexcel.test.temp.simple; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.FileInputStream; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.apache.poi.xssf.streaming.SXSSFRow; |
|
|
|
|
import org.apache.poi.xssf.streaming.SXSSFSheet; |
|
|
|
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
|
|
import org.junit.Ignore; |
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
|
|
import com.alibaba.easyexcel.test.temp.poi.PoiTest; |
|
|
|
|
import com.alibaba.easyexcel.test.util.TestFileUtil; |
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
|
|
|
@ -32,8 +23,8 @@ public class HgTest {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void hh() throws IOException { |
|
|
|
|
List<Object> list = |
|
|
|
|
EasyExcel.read(new FileInputStream("D:\\test\\hg2.xlsx")).sheet().headRowNumber(0).doReadSync(); |
|
|
|
|
List<Object> list = EasyExcel.read(new FileInputStream("D:\\test\\hg2.xlsx")).autoTrim(Boolean.FALSE).sheet() |
|
|
|
|
.headRowNumber(0).doReadSync(); |
|
|
|
|
for (Object data : list) { |
|
|
|
|
LOGGER.info("返回数据:{}", JSON.toJSONString(data)); |
|
|
|
|
} |
|
|
|
|