forked from fanruan/easyexcel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
809 B
33 lines
809 B
package com.alibaba.easyexcel.test.temp.simple; |
|
|
|
import java.io.FileInputStream; |
|
import java.io.IOException; |
|
import java.util.List; |
|
|
|
import org.junit.Ignore; |
|
import org.junit.Test; |
|
import org.slf4j.Logger; |
|
import org.slf4j.LoggerFactory; |
|
|
|
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")).autoTrim(Boolean.FALSE).sheet() |
|
.headRowNumber(0).doReadSync(); |
|
for (Object data : list) { |
|
LOGGER.info("返回数据:{}", JSON.toJSONString(data)); |
|
} |
|
} |
|
|
|
}
|
|
|