/// <summary>
 /// 导出excel文件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnToExcel_Click(object sender, EventArgs e)
 {
     try
     {
         WriteToExcel.getInstance().start();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "操作错误");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 得到实例
 /// </summary>
 /// <returns></returns>
 public static WriteToExcel getInstance()
 {
     lock (_lock)
     {
         if (instance == null)
         {
             instance = new WriteToExcel();
         }
         return(instance);
     }
 }