View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AJ[_8_] AJ[_8_] is offline
external usenet poster
 
Posts: 1
Default Trying to open an existing Excel file in C#

I am using Microsoft.Office.Interop.Excel namespace with C# in .net
2003. My issue is that when I try to open an Excel file using:

Excel.ApplicationClass xlApp = new
Microsoft.Office.Interop.Excel.ApplicationClass();

xlApp.Workbooks.Open("Filename here");

The open method does not have an overload that only takes one
parameter. The definition I recieve is:
"Microsoft.Office.Interop.Excel.Workbook Workbooks.Open(string
Filename, object UpdateLinks, object ReadOnly, object Format, object
Password, object WriteResPassword, object IgnoreReadOnlyRecommended,
object Origin, object Editable, object Notify, object Converter,
object AddToMru, object Local, object CorruptLoad)"
which is a little much in my opinion. I have looked on msdn and found
an example that used the same method with just a string filename. I
have found similar examples on other sites as well, but they use the
same implimentation. Any help would be greatly appreciated.
-AJ