I have a big excel but i want to read only one small sheet fast.
is there a way to read only one sheet without doing
workbook=new Workbook(filename) <- (this parses the entire file with sheets that i dont need and takes a long time)
Hi @turaaa,
String sheetName = "Sheet1";
LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFilter(new LoadFilter(){
@Override
public void startSheet(Worksheet sheet) {
if (sheet.getName().equals(sheetName)) {
setLoadDataFilterOptions(LoadDataFilterOptions.ALL);
} else {
setLoadDataFilterOptions(LoadDataFilterOptions.STRUCTURE);
}
}
});
Workbook workbook = new Workbook("test.xlsx", loadOptions);
Kind regards,
Taras
1 Like