Hi,
Here is the Code that I used to Export Datatable
DataTable dt = GetList();
SLDocument sl = new SLDocument();
sl.ImportDataTable(1, 1, dt, true);
string File_Name = name + " .xlsx";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + File_Name);
sl.SaveAs(Response.OutputStream);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.SuppressContent = true;
HttpContext.Current.ApplicationInstance.CompleteRequest();