Jiaju Zhuang
5 years ago
4 changed files with 60 additions and 11 deletions
@ -0,0 +1,42 @@
|
||||
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; |
||||
|
||||
/** |
||||
* 测试poi |
||||
* |
||||
* @author Jiaju Zhuang |
||||
**/ |
||||
@Ignore |
||||
public class HgTest { |
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HgTest.class); |
||||
|
||||
@Test |
||||
public void hh() throws IOException { |
||||
List<Object> list = |
||||
EasyExcel.read(new FileInputStream("D:\\test\\hg2.xlsx")).sheet().headRowNumber(0).doReadSync(); |
||||
for (Object data : list) { |
||||
LOGGER.info("返回数据:{}", JSON.toJSONString(data)); |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue