Groups | Blog | Home
all groups > dotnet interop > january 2007 >

dotnet interop : Unable to open excel file from Client



SK
1/8/2007 11:23:00 PM
My Code (vb.net scripting)

objExcel = CreateObject("excel.application")
objBook = objExcel.Workbooks.open([filename])

i have the issues as stated below when the code reaches the
objExcel.Workbooks.open([filename]). The server is running under Active
Directory too.

Error :
System.Runtime.InteropServices.COMException (0x800A03EC): '
c:\tmp\t21_vc_20061201_M12_ATP.xls' could not be found. Check the spelling of
the file name, and verify that the file location is correct. If you are
trying to open the file from your list of most recently used files on the
file menu, make sure that the file has been renamed, moved, or deleted.

I had check the file do existed and i can use windows explorer to browse the
RobinS
1/10/2007 11:41:52 AM
For some reason, your process can't see the file maybe. Perhaps it's
a security issue.

I'd put a line of code in before opening the workbook that checks for
FileExists. That would be illuminating. If it says it exists, then
the problem is with Excel. If it says it doesn't exist, then that's
your problem.

Robin S.
---------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button