Child pages
  • Project WONDER-Frameworks-ExcelGeneration
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

ExcelGeneration

Anjo Krank

You need to override appendToResponse on your page and make it look similar to:

 public void appendToResponse(WOResponse response, WOContext context) {
   super.appendToResponse(response, context);
   if(reportData != null) {
     response.setContent(reportData);
     reportData = null;
     String fileName = "results.xls";
     response.setHeader("inline; filename=\"" + fileName + "\"", "content-disposition");
     response.setHeader("application/vnd.ms-excel", "content-type");
     enableExcel = false;
   }
 }


  • No labels