Results 1 to 11 of 11

Thread: Import from Excel sheet

  1. #1
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43

    Import from Excel sheet

    Hi guys,
    Is there a query that allows me import
    data from an Excel file.
    any help will be appreciated
    Thank you in advance.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Select * from OPENROWSET ('Microsoft.Jet.OleDB.4.0', 'EXCEL 8.0;Database=C:\MyExcel1.xls',Sheet1$)

  3. #3
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43
    I will try it and let you know
    Thank you much

  4. #4
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43
    I get this error message.
    ---------
    The requested properties connot be supported.
    ---------
    what am I suppose to do for this one.

    Then after that I get this error message
    ---------
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    ---------

    Thank you so much for your help.

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    Tried this one?

    Select * from OPENROWSET ('Microsoft.Jet.OleDB.4.0', 'EXCEL 8.0;Database=C:\MyExcel1.xls',[Sheet1$])

  6. #6
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Select * from OPENROWSET ('Microsoft.Jet.OleDB.4.0', 'EXCEL 8.0;Database=C:\MyExcel1.xls',Sheet1$)

    it works for me on both sql server 7.0 and 2000.

    what version of XL sheet you are using?
    What SQL Server version?

  7. #7
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43
    I have Excel version 9.0.4402
    and OLE DB version 5.00.2195.3649
    and I am using MSSQL 7

    I changed the statement to:

    Select * from OPENROWSET ('Microsoft.Jet.OleDB.5.0', 'EXCEL 9.0;Database=C:\MyExcel1.xls',Sheet1$)

    and I tried to put the full version numbers it did not work either

    sometimes it imports some values but it gives me this error and it does not finish the whole table.

    The error:
    --------------
    could not locate registry entry for OLE DB provider 'Microsoft.Jet.OleDB.5.0'
    --------------

  8. #8
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43
    Hi Guys,
    Any suggestions please.

  9. #9
    Join Date
    Sep 2002
    Posts
    5,938
    Where is the excel file? On sql server's c:\ drive?

  10. #10
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    your Excel file should be on you server's drive.

  11. #11
    Join Date
    Feb 2003
    Location
    Tallahassee, Florida USA
    Posts
    43
    I guess I found out the problem
    The Application I'm using does not allow more than 20 records to be imported
    because its a trial version.
    Thank you guys so much for your help.

Posting Permissions

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