Hi

I am trying to open an Excel file, refresh the query behind it and then save and close the file in C#.

I have the following but I am getting errors on the
Code:
 Application excel = new Application()
section:

Code:
            Application excel = new Application();
            Workbook theWorkbook = excelFile.Workbooks._Open(txtLocation.Text, 0, false, 5, System.Reflection.Missing.Value, System.Reflection.Missing.Value,
...