title: Open Excel File, Refresh Query and Save C#
body: <p>I am trying to open an Excel file, refresh the query behind it and then save and close the file in C#.</p>
  
  <p>I have the following but I am getting errors on the following line first up:</p>
  
  <pre><code>        object _missingValue = System.Reflection.Missing.Value;
          Application excel = new Application();
          Workbook theWorkbook = excelFile.Workbooks._Open(txtLocation.Text, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue, _missingValue);
          Sheets sheets = (Sheets)theWorkbook.Worksheets;
          theWorkbook.RefreshAll();
          theWorkbook.Save();
          excel.Quit();
  </code></pre>
  
  <p>I have added the Microsoft.Office.Interop.Excel reference, but still have the issue, what I am missing?</p>