Ejemplo n.º 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Excel.ShowDialog();
         ex.Workbooks.Open(Excel.FileName, 0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
         Microsoft.Office.Interop.Excel.Worksheet ObjWorkSheet;
         ObjWorkSheet  = (Microsoft.Office.Interop.Excel.Worksheet)ex.Sheets[1];
         textBox1.Text = Excel.FileName.ToString();
     }
     catch
     {
     }
 }