Do you SharePoint?

Let's talk about it.
posts - 19, comments - 8, trackbacks - 0

Import Excel Sheet to SQL Server 2005 database

What should be a simple engagement turned into a headache this evening. Importing from Excel in Sql 2005 has become more cumbersome due to various 'issues' with the import/export wizard.  So here is a good solution:

SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\test\xltest.xls', [Customers$])

May have to enable Ad Hoc Remote queries in SAC.

May have to place the Excel file on the SQL server's file system.

Reference: http://support.microsoft.com/kb/321686/en-us

 

 

Print | posted on Tuesday, July 15, 2008 4:20 AM | Filed Under [ Development ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 2 and type the answer here:

Powered by: