i'm trying to open an existing excel worksheet. my code is:
Microsoft.Office.Interop.Excel.Application excelApp;
Microsoft.Office.Interop.Excel.Workbook excelWorkbook;
Microsoft.Office.Interop.Excel.Worksheet ExlWrkSheet;
private object Opt = Type.Missing
excelApp = new ApplicationClass();
excelWorkbook = excelApp.Workbooks.Open("..//..//Data.xls", Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt, Opt);
on the last line i get an exception that he cannot find the file.
i placed the file in the project directory.
i tried also "Data.exl" path when the file is placed in the debug directory, it didn't helped.
what am i doing wrong ?