コード例 #1
0
 private void OnExport(object sender, EventArgs e)
 {
     if (data == null)
     {
         return;
     }
     status.Text = "Exporting... Please wait.";
     try
     {
         ExcelConvert.Export(data);
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     status.Text = "Export finished.";
 }
コード例 #2
0
 private void OnImport(object sender, EventArgs e)
 {
     if (importDlg.ShowDialog(this) == DialogResult.OK)
     {
         status.Text = "Importing... Please wait.";
         try
         {
             data = ExcelConvert.Import(importDlg.FileName);
         }
         catch (Exception ex)
         {
             MessageBox.Show(this, ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         UpdateAll();
         status.Text = "Import finished.";
     }
 }