protected void PivotGrid_ServerExcelExporting(object sender, Syncfusion.JavaScript.Web.PivotGridEventArgs e) { PivotGridExcelExport pGrid = new PivotGridExcelExport(); dynamic args = e.Arguments; string fileName = "Sample"; pGrid.ExportToExcel(fileName, args["args"].ToString(), HttpContext.Current.Response); }
public ActionResult ExcelExport() { PivotGridExcelExport pGrid = new PivotGridExcelExport(); var context = _contextAccessor.HttpContext; var args = context.Request.Form.ElementAt(0).Value; string fileName = "Sample"; return(pGrid.ExportToExcel(fileName, args, context.Response)); }