WebObjects/Project WONDER/Frameworks/ExcelGeneration
< WebObjects < Project WONDER < FrameworksExcelGeneration
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; } }
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.