[Dojo-interest] export table data to save in excel format
Tom Trenka
dojo-interest at dept-z.com
Wed Feb 28 12:24:26 MST 2007
You'd be better off creating a hidden iframe and hitting that link that way;
afaik using the content-disposition header will have no effect on browser
behavoir if the request is being made via XmlHTTP.
trt
Msangani wrote:
>
> I am trying to getExcel data in the following way:
> Hi,
>
> dojo.io.bind({
> url: "genReports.do",
> content: {dispatch:"getExcelData"},
> method: "POST",
> mimetype: "text/html",
> load: function(type,value,evt){
> dojo.debug(value);
> //showReportDialog(value);
> },
> error: function(type,error) {alert("Error: " + error.message); }
> });
>
> I get the response with the table filled with the data that was expected
> But I am not sure what do with the response to display a prompt to save
> excel file or display it in the browser
>
> I set the header/content type in my action class to the following
> response.setHeader("Content-Disposition", "inline;
> filename=whatever.xls;");
> response.setContentType("application/vnd.ms-excel");
>
>
> Thanks very much
> Manish
>
--
View this message in context: http://www.nabble.com/export-table-data-to-save-in-excel--format-tf3317887.html#a9226509
Sent from the Dojo mailing list archive at Nabble.com.
More information about the Dojo-interest
mailing list