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:
// open database
dbDatabase.Open(strFileName, FALSE, FALSE, "Excel 8.0;");
if (!dbDatabase.IsOpen()) AfxMessageBox("E-048 Could not open Excel input file.");
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
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.
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.