
Opening Excel Document Via c#
I have a project where I have to open an existing office
XP Excel Doc with several worksheets, and parse it. But I
can't for the life of me figure out how to open the dang
thing using C#. I have looked all over msdn and the params
for the open method don't look even remotely the same as
what came in via my interop package.
Note: also posted on microsoft.public.excel.interopoledde
Here is what the method looks like:
Excel.Workbook _Open ( System.String Filename ,
System.Object UpdateLinks , System.Object ReadOnly ,
System.Object Format , System.Object Password ,
System.Object WriteResPassword , System.Object
IgnoreReadOnlyRecommended , System.Object Origin ,
System.Object Delimiter , System.Object Editable ,
System.Object Notify , System.Object Converter ,
System.Object AddToMru )
My code I was trying:
excelFileName = openFileDialog1.FileName;
Excel.Workbooks wb = ??????;
try
{
wb.Open(
excelFileName ,false ,true ,null,null,null,true,null,null,f
alse,false,false,false,true,false);
Quote:
}
catch (Exception debug1)
{
string sdfsd = debug1.Message;
Quote:
}