Anyone Using a Combination of Excel 2007, Windows Server 2008 and

Giganews Newsgroups
Subject: Anyone Using a Combination of Excel 2007, Windows Server 2008 and
Posted by:  raj
Date: Tue, 8 Jul 2008

We wanted to know if anyone is using the above combination to
programmatically open the Excel 2007 through a windows service in Server 2008?
We are getting the following error while attempting to do so :

Code Used :
Microsoft.Office.Interop.Excel.ApplicationClass app = new ApplicationClass();
Microsoft.Office.Interop.Excel.Workbooks wb = app.Workbooks;
wb.Open(filepath, false, false, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, false, Missing.Value, Missing.Value);

Error :
‘System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office
Excel cannot access the file '[filename]'. There are several possible
reasons: • The file name or path does not exist. • The file is being used by
another program. • The workbook you are trying to save has the same name as a
currently open workbook.’

Replies