|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 10:51 AM
Points: 531,
Visits: 416
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, August 14, 2012 4:56 PM
Points: 2,
Visits: 6
|
|
| Thanks for your article. Do you also have a solution for sheet xml imports if the sheet name is change randomly or with a certain string?
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, September 12, 2012 5:17 AM
Points: 329,
Visits: 461
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, December 17, 2012 10:05 PM
Points: 4,
Visits: 11,712
|
|
I recently came across this problem when we moved from Windows 32bit to Windows 64bit, using SQL 2005/2008 64bit. There are a lot of openrowset/opedatasource for older Excel 2003 xls.
I've finally found a free solution. It seems like Microsoft has replacement Office driver for "Microsoft.Jet.4.0" with its "Microsoft.ACE.OLEDB.12.0".
For 32 bits download the 2007 Office System Driver:Data Connectivity Components http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en
For 64 bits download the 2010 beta (Release June 2010)
http://www.microsoft.com/downloads/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=ja&displaylang=en
Installation of both doesn't require reboot. The 32/64 bits odbc will have the ACE driver for Access/Excel/dbase/cvs/txt after installation and the SQL Provider drivers "Microsoft.ACE.OLEDB.12.0" will be in your 32/64bit SQL Engine.
After installation, in SQL Engine, run the following
USE [master] GO EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1 GO EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1 GO
The "Microsoft.ACE.OLEDB.12.0" driver is backward compatible to Excel 2003, so you really can open xls files with this driver.
On a separate note, I've installed Office 2010 beta application, and it did not come with Microsoft.Jet.4.0, so my question is, is Microsoft replacing "Microsoft.Jet.4.0" with "Microsoft.ACE.OLEDB.12.0" on all their future development and slowly phrasing out the jet?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, March 21, 2013 11:48 PM
Points: 1,
Visits: 40
|
|
| Great article, do you have a solution for importing a large csv file aswell? I tried your solution but keep on getting the “Invalid Excel worksheet. No data in the worksheet” error.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, August 14, 2012 4:56 PM
Points: 2,
Visits: 6
|
|
For import of csv files i would go for someting like this: SELECT * INTO tabelA FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\Data;','select * from tabelB.csv')
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 11:26 PM
Points: 1,
Visits: 47
|
|
Great article - I'm looking for clues to solve the following problem.
Right now, my scheduled SSIS package (SQL08) to import Excel spreadheet data into SQL 08 works when the Excel spreadsheet is closed. It also works when the spreadsheet is open if I run the job manually from the Import Data wizard.
However, the scheduled SSIS package fails with the 'Jet engine cannot open file' error when the spreadsheet is open. Is it possible to schedule an SSIS package to import data from an open Excel file to SQL Server?
Many thanks for any tips.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 31, 2012 4:17 AM
Points: 5,
Visits: 39
|
|
Jim Cheong (2/17/2010) I recently came across this problem when we moved from Windows 32bit to Windows 64bit, using SQL 2005/2008 64bit. There are a lot of openrowset/opedatasource for older Excel 2003 xls.
I've finally found a free solution. It seems like Microsoft has replacement Office driver for "Microsoft.Jet.4.0" with its "Microsoft.ACE.OLEDB.12.0".
For 32 bits download the 2007 Office System Driver:Data Connectivity Components http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en
For 64 bits download the 2010 beta (Release June 2010)
http://www.microsoft.com/downloads/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en
Useful, thanks Jim
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 29, 2013 5:56 PM
Points: 6,
Visits: 150
|
|
I wrestled with this for quite awhile. I ended up doing a very manual thing. I blogged about it here http://www.prd-software.com/blogs/entryid/60/importing-or-converting-microsoft-excel-data-into-sql-server.aspx
Hope it helps someone. Rod
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:06 AM
Points: 1,026,
Visits: 751
|
|
So have you also got a nice bit of TSQL that will parse a directory of 1000s of excel sheets, open them all and save them as xml?
|
|
|
|