Jul 28, 2014, 5:43 AM
[CLOSED] Export to Excel - MVC
I have been trying to combine the following examples without success:
Exporting a grid as a file from:
http://mvc.ext.net/#/GridPanel_Pagin...Sorting/Local/
and the excel format export from:
https://examples2.ext.net/#/GridPane...ort_Data_Ajax/
Can you please tell me how to add Excel file formatting:
Exporting a grid as a file from:
http://mvc.ext.net/#/GridPanel_Pagin...Sorting/Local/
and the excel format export from:
https://examples2.ext.net/#/GridPane...ort_Data_Ajax/
Can you please tell me how to add Excel file formatting:
this.Response.ContentType = "application/vnd.ms-excel";
this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xls");
XslCompiledTransform xtExcel = new XslCompiledTransform();
xtExcel.Load(Server.MapPath("Excel.xsl"));
xtExcel.Transform(xml, null, Response.OutputStream);
to the MVC action method: public ActionResult Submit(SubmitHandler handler)
{
return this.File(new System.Text.UTF8Encoding().GetBytes(handler.Xml.OuterXml), "application/xml", "submittedData.xml");
}
Last edited by Daniil; Aug 05, 2014 at 12:57 PM.
Reason: [CLOSED]