protected void btnXlsExport_Click(object sender, EventArgs e)
{
//GridExporter.WriteXlsToResponse();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=MyFiles.xls");
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
ASPxGridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
Maen BadwanPosted Nov 23, 2017, 11:29 AM
You can find an online demo that uses the document conversion service here:
https://demo.leadtools.com/JavaScript/DocumentViewer/
When you open the online demo, open your image and then select the menu "File\Export" to save the image as Excel (xls) format.
More details about the class can be found here:
https://www.leadtools.com/help/leadtools/v19/dh/doxc/documentconverter.html