title: How can I open an excel file using openFileDialog
body: <p>I am having a hard time figuring this out.  I would like to do on button click event to open a <code>filedialog</code> window in which the user will select an excel file and the file will get open in excel.</p>
  
  <p>I have created the <code>filebox</code> and I am able to get the excel to open a new file,but I can't figure out how to get the two to mesh.</p>
  
  <p>what I am trying to use is as follows,</p>
  
  <pre><code>using Excel = Microsoft.Office.Interop.Excel;
  using System.Reflection; 
  
  private void button1_Click(object sender, EventArgs e)
  {
     {
          if (openFileDialog1.ShowDialog() == DialogResult.OK)
          {
             System.IO.StreamReader sr = new
             System.IO.StreamReader(openFileDialog1.FileName);
             MessageBox.Show(sr.ReadToEnd());
             sr.Close();
          }
     }
  }
  </code></pre>
  
  <p>and I was going to use this to open excel</p>
  
  <pre><code>Excel.Application excel = new Excel.Application();
  Excel.Workbook wb = excel.Workbooks.Open(filename);
  </code></pre>