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