I am currently using add-on TableExport.
I have a problem when trying to export multiple excel files within one time button event click. Simply I use for-loop and hopefully it export multiple excel files, but what it really does is to generate only the last excel file. I notice that there is a problem with temporary-downloading file code. Any suggestions? thank in advance.
for( …){
if (subAppCollection.size() > 0) {
ExcelExport excelExport = new ExcelExport(table, “strSheetName”);;
excelExport.setExportFileName(“dynamicStr” + “.xls”);
excelExport.setDisplayTotals(false);
excelExport.setRowHeaders(true);
excelExport.convertTable();
for (int i = 1; i < subAppCollection.size(); ++i) {
String subAppName = subAppCollection.get(i).getSubapplicationname();
excelExport.setNextTable(getAllLogsTable(subAppName), subAppName);
if (i == subAppCollection.size() - 1) {
excelExport.export();
} else {
excelExport.convertTable();
}
}
}
}