CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Exclamation 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

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Opening Excel files on Vista

    Try to use "Excel 12.0"
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2008
    Posts
    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

  4. #4
    Join Date
    Nov 2008
    Posts
    3

    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.

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Opening Excel files on Vista

    Sorry, I never worked with excel 2007, so try to search for your problem with Google. For instance:
    http://www.google.com/search?sourcei...sam+excel+2007
    http://groups.google.com/groups?sour...=1&sa=N&tab=wg
    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
  •  





Click Here to Expand Forum to Full Width

Featured