Child pages
  • Project WONDER-Frameworks-ExcelGeneration

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

ExcelGeneration

Anjo Krank

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

Panel
Wiki Markup
Code Block

 
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;
   }
 }


}

Category:WebObjects