private void btn_out_Click(object sender, EventArgs e) { ExportToExcel ete = new ExportToExcel(); string cbo = ""; if (cbo_out.Text == "家长信息") { cbo = "Parents"; } else if (cbo_out.Text == "家长-家教") { cbo = "Parents-Tutors"; } else if (cbo_out.Text == "家教-家长") { cbo = "Tutors-Parents"; } else if (cbo_out.Text == "教员信息") { cbo = "Tutors"; } else if (cbo_out.Text == "工作人员信息") { cbo = "Workers"; } else if (cbo_out.Text == "责任认定") { cbo = "Responsibility"; } else { }; ete.ExportExcel("default.xlsx", cbo); }
private void btn_form_Click(object sender, EventArgs e) { ExportToExcel ete = new ExportToExcel(); ete.ExportExcel("default.xlsx", dgv_form); }