protected void btn_ExportExcel_Click(object sender, EventArgs e) { try { bindgrid(); try { string result; if (ddl_reportList.SelectedItem.Value == "SP_FACULTY_TURNITIN") { result = ExcelUtility.WithoutColumnToExcel(gV_View.DataSource); } else { result = ExcelUtility.ToExcel(gV_View.DataSource); } ExcelUtility.ExportToExcel(result); } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please check Excel configuration !!!"; } } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please Select all the values"; } }
private void ExportToExcel(DataTable Dtb) { gV_CoreText.DataSource = Dtb; gV_CoreText.DataBind(); string result = ExcelUtility.ToExcel(gV_CoreText.DataSource); ExcelUtility.ExportToExcel(result); }
public void LoadExcel() { try { string result = ExcelUtility.ToExcel(GrvDetails.DataSource); ExcelUtility.ExportToExcel(result); } catch { } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { try { DataView dv = (DataView)dsDetails.Select(DataSourceSelectArguments.Empty); DataTable dt = new DataTable(); dt = dv.ToTable(); string result = ExcelUtility.ToExcel(dt); ExcelUtility.ExportToExcel(result); } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please check Excel configuration !!!"; } }
protected void BtnDownload_Click(object sender, EventArgs e) { if (RdbStudentClash.Checked == true) { BindGrid(); try { string result = ExcelUtility.ToExcel(GrdEnrollmentDetails.DataSource); ExcelUtility.ExportToExcel(result); } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please check Excel configuration !!!"; } } else { } }
protected void BtnExportStudentDetails_Click(object sender, EventArgs e) { try { BindStudentDetailsGrid(); try { string result = ExcelUtility.ToExcel(GrvDetails.DataSource); ExcelUtility.ExportToExcel(result); } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please check Excel configuration !!!"; } } catch { } }
protected void BtnBlkDownload_Click(object sender, EventArgs e) { try { BindBulkReport(); try { string result = ExcelUtility.ToExcel(DT); ExcelUtility.ExportToExcel(result); } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please check Excel configuration !!!"; } } catch { // lbl_ack.Visible = true; // lbl_ack.Text = "Please Select all the values"; } }