Results 1 to 5 of 5

Thread: problems reading xls in asp ...

  1. #1
    Join Date
    Apr 2005
    Location
    Bucks. UK
    Posts
    223
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default problems reading xls in asp ...

    Hi,

    does anyone have some working code to read a normal xls file using asp.

    I have a couple of examples myself but they refuse to work?? I don't know if it's a compatibility issue as I'm writing xls from office 2k7.

    I've breilfly attempted to read xlsx but the required driver doesn't appear to be installed - Note to Warren can you install the Microsoft.ACE.OLEDB.12.0 provider.

    I've tried all the following connection strings
    Code:
    "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=NO; Excel 8.0; DBQ=" & sFilePath & "; "
    
    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sFilePath & ";Extended Properties=""Excel 8.0;HDR=NO;"""
    and this was the xlsx connection string I tried:
    Code:
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source="&sFilePath&";Extended Properties=""Excel 12.0 Xml;HDR=YES"";"
    Any help would be greatly appreciated.

    Regards
    Keith

  2. #2
    Join Date
    Feb 2004
    Posts
    4,877
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Where does Microsoft.ACE.OLEDB.12.0 come from?
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  3. #3
    Join Date
    Apr 2005
    Location
    Bucks. UK
    Posts
    223
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    Good question, I'd just searched for xlsx connection string and came up with http://www.connectionstrings.com/excel-2007 amongst others.

    Regards
    Keith

  4. #4
    Join Date
    Apr 2005
    Location
    Bucks. UK
    Posts
    223
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    Quote Originally Posted by Warren Ashcroft View Post
    Where does Microsoft.ACE.OLEDB.12.0 come from?
    Here: http://www.microsoft.com/downloads/d...displaylang=en by the looks of things. This is the 2007 Office System Driver: Data Connectivity Components

    Regards
    Keith

  5. #5
    Join Date
    Feb 2004
    Posts
    4,877
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Quote Originally Posted by RMPnet View Post
    Here: http://www.microsoft.com/downloads/d...displaylang=en by the looks of things. This is the 2007 Office System Driver: Data Connectivity Components

    Regards
    Keith
    I will get this installed for you...
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  6. The Following User Says Thank You to Warren Ashcroft For This Useful Post:

    RFH Reseller: RMPnet (24th February 2009)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •