WebObjects/Project WONDER/Frameworks/ExcelGeneration

ExcelGenerationEdit

Anjo KrankEdit

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;
   }
 }
Last modified on 11 May 2009, at 20:19