protected bool CompleteTask() { GetGVData FillGV = new GetGVData(); ExcelFileOperations FileOperations = new ExcelFileOperations(); DataSet ds = new DataSet(); ds.Tables.Add(FillGV.GetDMApprovedForCEO("spPrintExcel", "SEDOCAPPROVED", "Bengaluru Dakshina", "APPROVED")); FileOperations.ExportToExcel(ds, Server.MapPath("~/DownloadFiles/" + "Bengaluru Dakshina" + ".xlsx"), "3", "Bengaluru Dakshina"); System.Threading.Thread.Sleep(3000); return(true); }
protected void btnExportExcel_Click(object sender, EventArgs e) { ExcelFileOperations FO = new ExcelFileOperations(); GetDataToProcess GDTP = new GetDataToProcess(); DataTable employees = new DataTable(); DataSet ds = new DataSet(); ds.Tables.Add((GDTP.GetData("spGetDataToApprovalProcess", "SESELECTCW", "Bengaluru Dakshina", "asdf"))); ds.Tables.Add(GDTP.GetData("spGetDataToApprovalProcess", "SESELECTCW", "Bengaluru Dakshina")); //D:\Project\KACDCProject\KACDC\KACDC\DownloadFiles\ FO.ExportToExcel(ds, Server.MapPath("~/DownloadFiles/") + "ABC.xlsx", "", "Bengaluru Dakshina"); }