You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
默认读是用XSSFWorkBook吗,怎么改成HSSFWorkBook
异常:The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents.You need to call a different part of POI to process this data (eg HSSF instead of XSSF)
// 写法1:JDK8+ ,不用额外写一个DemoDataListener
// since: 3.0.0-beta1
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
// 这里默认每次会读取100条数据 然后返回过来 直接调用使用数据就行
// 具体需要返回多少行可以在PageReadListener的构造函数设置
EasyExcel.read(fileName, DemoData.class, new PageReadListener(dataList -> {
for (DemoData demoData : dataList) {
log.info("读取到一条数据{}", JSON.toJSONString(demoData));
}
})).sheet().doRead();
The text was updated successfully, but these errors were encountered:
默认读是用XSSFWorkBook吗,怎么改成HSSFWorkBook
异常:The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents.You need to call a different part of POI to process this data (eg HSSF instead of XSSF)
// 写法1:JDK8+ ,不用额外写一个DemoDataListener
// since: 3.0.0-beta1
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
// 这里默认每次会读取100条数据 然后返回过来 直接调用使用数据就行
// 具体需要返回多少行可以在
PageReadListener
的构造函数设置EasyExcel.read(fileName, DemoData.class, new PageReadListener(dataList -> {
for (DemoData demoData : dataList) {
log.info("读取到一条数据{}", JSON.toJSONString(demoData));
}
})).sheet().doRead();
The text was updated successfully, but these errors were encountered: