Import named range

  • Hi. I am trying to import an named range from excel into sql but do not know how to using dts. I found this to run in query analzer, but doesn't work. Can anyone tell me if they've done this before?

    select *

    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

                    'Excel 8.0;HDR=YES;IMEX=2;DATABASE=\\city-fileserver\Shared\Technology Services\SQL Server\test.xls',

                    'SELECT * FROM [test]')

     

    It gives me the following error:

    OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.

    OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005:  The provider did not give any information about the error.].

    Thanks!

    Thanks!

  • Thanks anyway. I figured it out and it was actually pretty easy. I guess I was expecting it to be much more difficult. I basically created a dts package to grad the spreadsheet and then used a query to transfer only the named range I needed.

    Thanks!!

    Thanks!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply