Browse Source

优化读写逻辑

bugfix
zhuangjiaju 5 years ago
parent
commit
c2caa64f69
  1. 29
      src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java
  2. 4
      src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiTest.java

29
src/test/java/com/alibaba/easyexcel/test/temp/Xls03Test.java

@ -0,0 +1,29 @@
package com.alibaba.easyexcel.test.temp;
import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.fastjson.JSON;
/**
* 临时测试
*
* @author Jiaju Zhuang
**/
@Ignore
public class Xls03Test {
private static final Logger LOGGER = LoggerFactory.getLogger(Xls03Test.class);
@Test
public void test() {
List<Object> list = EasyExcelFactory.read("D:\\test\\1.xls").sheet().doReadSync();
for (Object data : list) {
LOGGER.info("返回数据:{}", JSON.toJSONString(data));
}
}
}

4
src/test/java/com/alibaba/easyexcel/test/demo/poi/PoiTest.java → src/test/java/com/alibaba/easyexcel/test/temp/poi/PoiTest.java

@ -1,4 +1,4 @@
package com.alibaba.easyexcel.test.demo.poi;
package com.alibaba.easyexcel.test.temp.poi;
import java.io.File;
import java.io.IOException;
@ -48,7 +48,5 @@ public class PoiTest {
LOGGER.info("第一行数据:{}", row);
xssfSheet.createRow(20);
LOGGER.info("一共行数:{}", xssfSheet.getLastRowNum());
}
}
Loading…
Cancel
Save