alibaba / easyexcel

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

主动中断读取(只读标题行) 和 重复读取(读sheet概要再读某sheet内容) #3882

Open TYB-LuoYun opened 2 months ago

TYB-LuoYun commented 2 months ago

请大佬帮忙解答下,先谢谢了 能够重复读取么?如果我想先读下有哪些sheet,再读取sheet内容的话,该怎么写? Snipaste_2024-07-13_10-42-32 能够主动中断读取么?我只想读取标题行,不想读取内容,有时候内容多耗费时间但是我只想读取标题行 Snipaste_2024-07-13_10-44-10

NathanCZEM commented 4 weeks ago

主动中断读取,只读标题,不读内容: 在读取时指定headRowNumber(),然后重写ReadListener的public boolean hasNext(AnalysisContext context) 方法,这样会在遍历完自定义的Listener后,停止遍历。不知是否满足你的需求: image image image