Trying to open an existing Excel file in C#

A

AJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top