Exemple #1
0
        /* Открыть Excel файл */
        void openFileExcel()
        {
            FormOpenExcel FOpenExcel;

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                FOpenExcel           = new FormOpenExcel();
                FOpenExcel.FileName  = openFileDialog1.FileName;
                FOpenExcel.MdiParent = DataForms.FClient;
                FOpenExcel.Show();
            }
        }
Exemple #2
0
 void openFileExcel()
 {
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         fileTextBox.Text = openFileDialog1.FileName;
         if (fileTextBox.Text.Substring(fileTextBox.Text.Length - 3) == "xls")
         {
             readExcelFormat972003();
         }
         else
         {
             readExcelFormat2007();
         }
         FormOpenExcel FOpenExcel = new FormOpenExcel();
         FOpenExcel.FileName  = openFileDialog1.FileName;
         FOpenExcel.MdiParent = DataForms.FClient;
         FOpenExcel.Show();
     }
 }