Browse Source

fix some typos

pull/1117/head
dota17 5 years ago
parent
commit
1845b6b0a1
  1. 6
      src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java
  2. 4
      src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
  3. 4
      src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

6
src/test/java/com/alibaba/easyexcel/test/demo/read/NoModleDataListener.java → src/test/java/com/alibaba/easyexcel/test/demo/read/NoModelDataListener.java

@ -16,8 +16,8 @@ import com.alibaba.fastjson.JSON;
*
* @author Jiaju Zhuang
*/
public class NoModleDataListener extends AnalysisEventListener<Map<Integer, String>> {
private static final Logger LOGGER = LoggerFactory.getLogger(NoModleDataListener.class);
public class NoModelDataListener extends AnalysisEventListener<Map<Integer, String>> {
private static final Logger LOGGER = LoggerFactory.getLogger(NoModelDataListener.class);
/**
* 每隔5条存储数据库实际使用中可以3000条然后清理list 方便内存回收
*/
@ -40,7 +40,7 @@ public class NoModleDataListener extends AnalysisEventListener<Map<Integer, Stri
LOGGER.info("所有数据解析完成!");
}
/**
/**git
* 加上存储数据库
*/
private void saveData() {

4
src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java

@ -236,9 +236,9 @@ public class ReadTest {
* 不创建对象的读不是特别推荐使用都用String接收对日期的支持不是很好
*/
@Test
public void noModleRead() {
public void noModelRead() {
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
// 这里 只要,然后读取第一个sheet 同步读取会自动finish
EasyExcel.read(fileName, new NoModleDataListener()).sheet().doRead();
EasyExcel.read(fileName, new NoModelDataListener()).sheet().doRead();
}
}

4
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java

@ -418,9 +418,9 @@ public class WriteTest {
* 不创建对象的写
*/
@Test
public void noModleWrite() {
public void noModelWrite() {
// 写法1
String fileName = TestFileUtil.getPath() + "noModleWrite" + System.currentTimeMillis() + ".xlsx";
String fileName = TestFileUtil.getPath() + "noModelWrite" + System.currentTimeMillis() + ".xlsx";
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
EasyExcel.write(fileName).head(head()).sheet("模板").doWrite(dataList());
}

Loading…
Cancel
Save