TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nathan Pongar
NA
1
0
Interop.Excel open file problem
Jan 11 2006 8:12 PM
Hi everyone,
I'm having a problem automating
Excel
XP
using the
Office XP
Primary Interop Assemblies.
In my
code
I successfully instantiate an Excel Application class, and I can add a new workbook no problem. The trouble comes when I'm trying to open an existing workbook. Whenever I try to open a workbook I get the following error:
'blah.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 not been renamed, moved, or deleted.
The file does exist though. What's really weird is that when I create a new workbook using excelApp.Workbooks.Add() and save it, I can open that workbook later using excelApp.Workbooks.Open() and I won't get the error. I've looked through the existing files (that cause the error) and the ones I created from my c# code (no error) for differences that could cause this but I've gotten no-where.
Anyone have any ideas/sage-like advice?
Reply
Answers (
0
)
Passing long from ASP to C# method
Excel and Interop