alibaba / easyexcel

快速、简洁、解决大文件内存溢出的java处理Excel工具
https://easyexcel.opensource.alibaba.com
Apache License 2.0
32.5k stars 7.54k forks source link

读取excel获取不到表头V2.1.6 #1053

Closed yangliu817 closed 4 years ago

yangliu817 commented 4 years ago

`@Override /**

zhuangjiaju commented 4 years ago
        MultipleSheetsListener multipleSheetsListener = new MultipleSheetsListener();
        ExcelReader excelReader = EasyExcel.read(file, MultipleSheetsData.class, multipleSheetsListener).build();
        List<ReadSheet> sheets = excelReader.excelExecutor().sheetList();
        int count = 1;
        for (ReadSheet readSheet : sheets) {
            excelReader.read(readSheet);
            Assert.assertEquals((long)multipleSheetsListener.getList().size(), (long)count);
            count++;
        }
        excelReader.finish();

03版的再读取头的时候会读取整个xls,后续会优化。