I have some problems when I use JXLS
to do the excel file export. It is really slow to transform the param list to the excel file when the map size is larger than 5000. Is there any faster solution?
This is the code:
private Workbook generateWorkbook(String templateFilePath, Map<String, Object> contextBeans) {
try {
InputStream is = new FileInputStream(templateFilePath);
XLSTransformer xlsTransformer = new XLSTransformer();
return xlsTransformer.transformXLS(is, contextBeans);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (InvalidFormatException e) {
e.printStackTrace();
}
return null;
}
It takes 7 seconds to generate the Workbook object where the size of contextBeans
>5000