-
November 23rd, 2008, 03:20 PM
#1
Opening Excel files on Vista
I need very urgent help on a problem which could be something simple. I have an MS Visual C++ application where I access Excel files for data. I use the MFC DAO method to access these external files to read an update data. Here are the statements I use to open the Excel files:
try
{
// open database
dbDatabase.Open(strFileName, FALSE, FALSE, "Excel 8.0;");
if (!dbDatabase.IsOpen()) AfxMessageBox("E-048 Could not open Excel input file.");
else
{
This method worked very well until I moved to a Vista computer that uses MS Excel 2007. These statements no longer work and I am not able to open my data files (i.e. external Excel files). I am mot sure whether the problem is a Vista problem or an Excel 2007 problem. I think I need to change the last parameter in the open command "Excel 8.0;" but do not know what to replace it with. Can someone help me with this problem? Any help you offer will be greatly appreciated. Many thanks in advance. Alice
-
November 23rd, 2008, 03:53 PM
#2
Re: Opening Excel files on Vista
Victor Nijegorodov
-
November 23rd, 2008, 04:46 PM
#3
Re: Opening Excel files on Vista
Victor, thanks for the quick response. I mad ethe chnage you recommended and I still hav ethe problem. I get a message saying the following:
"This program has stopped working correctly. Windows will close the program and notify you if a solution is available."
I am wondering if I need to distribute different dll files under the Vista computer. At the moment, I am distributing DAO350.dll and DAO2535.TLB. Perhaps the Vista computer requires a different set of files to suport the DAO properly. What do you think? Others, please chime in if you have aby thoughts on this.
Many thanks. Alice
-
November 23rd, 2008, 06:11 PM
#4
Re: Opening Excel files on Vista
After I made the change Victor suggested above, I began getting a different error message. Perhaps, this is an indication that I am making progress. Now I get the following message: "Could not find installable ISAM." If you have any suggestions in terms of how to revise my installation file to account for the Version 2007 Excel on Vista I will greatly appreciate it. Alternatively, if you can suggest an article to me where this topic is discussed that would also be great. Thanks.
-
November 24th, 2008, 04:07 AM
#5
Re: Opening Excel files on Vista
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|