Re: Generate PDF and Excel documents
Re: Generate PDF and Excel documents
- Subject: Re: Generate PDF and Excel documents
- From: Art Isbell <email@hidden>
- Date: Wed, 19 Mar 2003 09:25:12 -1000
On Wednesday, March 19, 2003, at 12:14 AM, email@hidden
wrote:
Also i need to export the report data to Microsoft excel sheet.
You can create tab-delimited ASCII spreadsheet content and download
that. This will load into Excel without problems as long as your
spreadsheet data doesn't contain tabs :-) Something like the following
should get you started.
public WOActionResults downloadReport() {
WOResponse response = new WOResponse();
response.setContent(tabDelimitedReportContent());
response.setHeader("attachment; filename=\"report.txt\"",
"content-disposition");
response.setHeader("application/vnd.ms-excel", "content-type");
return response;
}
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.