CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    [RESOLVED] Processing an Excel File (.xlsx format) with VB6 Code

    For many years I have successfully Opened, Read, Created new Excel files with the file extension .xls

    Today we have the file extension .xlsx which no longer can be read by my older programs.

    Is it just a case of re-compiling my code with a Reference to the newer Excel Versions (which generate .xlsx files by default) ?

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: Processing an Excel File (.xlsx format) with VB6 Code

    I am using an ODBC driver Connection

    This works

    Code:
    Excel 97, 2003
     
    Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};
    DBQ=C:\MyExcel.xls; 
    
    Excel 2007
     
    Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};
    DBQ=C:\MyExcel.xlsx;
    I am surprised that I am able to open the xlsx file on a machine which does not have Excel 2007 (or above ) installed on it.

    I have Excel 2003 installed on the machine PLUS THE OFFICE COMPATIBILITY PACK - this may be the reason

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