public static void ExportExcel2(string caption, string date, DataGridView dgv, string FileName) { dlgExcelOdbc2 fd = new dlgExcelOdbc2(ProGressForm.ExportToExcel); sync = fd.BeginInvoke(caption, date, dgv, FileName, null, null); pgf = new ProGressForm(); pgf.l_Notice.Text = "正在导出...."; pgf.progressBar1.Style = ProgressBarStyle.Blocks; pgf.progressBar1.Value = 0; pgf.ShowDialog(); }
public static void ExportExcel(System.Windows.Forms.DataGridView gridView, string FileName) { dlgExcelOdbc fd = new dlgExcelOdbc(ProGressForm.FillExcel); sync = fd.BeginInvoke(gridView, FileName, null, null); pgf = new ProGressForm(); pgf.l_Notice.Text = "正在导出...."; pgf.progressBar1.Style = ProgressBarStyle.Blocks; pgf.progressBar1.Value = 0; pgf.ShowDialog(); }