XL to Table using sqlserver2000

Posted by Mahendrabasutkar under Sql Server on 5/26/2011 | Points: 10 | Views : 979 | Status : [Member] | Replies : 3
How to import data from XL Document into data table using sql server 2000




Responses

Posted by: Lakn2 on: 5/26/2011 [Member] Starter | Points: 25

Up
0
Down
try this query

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

http://support.microsoft.com/kb/321686

Thanks&Regards
LakshmiNarayana Nalluri.

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mahendrabasutkar on: 5/27/2011 [Member] Starter | Points: 25

Up
0
Down
INSERT INTO dbo.Test_Sql1234
SELECT Name,eid FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\Book12.xls',[Sheet1$])
Go

Where dbo.Test_Sql1234:- is my TableName
Name,eid :-are my columns
C:\Book12.xl :-Is the file name containing in c drive
Sheet1:-is the sheet no, present Excel sheet

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 6/17/2011 [Member] Starter | Points: 25

Up
0
Down
try this also

http://stackoverflow.com/questions/375991/import-excel-spreadsheet-columns-into-sql-server-database

Thanks&Regards
LakshmiNarayana Nalluri.

Mahendrabasutkar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response