PDA

View Full Version : transfering Excel data into SQL Server 2000 table


chelvis
07-07-2006, 03:59 PM
I have a Excel data sheet with the following columns: OrderID, ProductID, CustomerID, OrderDate, ItemName. I have about 10 orders (meaning 10 rows in the excel sheet).

Is there a way to transfer this data into a table in SQL server 2000 using asp.net? I read the msdn website and they are talking about some thing linked servers and etc. But I am not understanding that (http://support.microsoft.com/?kbid=321686#4d). They have written some code in VB, but its just partial and I dont know where to start.

Brandoe85
07-07-2006, 04:05 PM
It's really simple to do using DTS. Or does this need to be done with asp.net?
The link you posted has a DTS example, it's just an import/export wizard.

chelvis
07-07-2006, 04:41 PM
Thanks, it doesnt matter. Its just for my project. But if there is a way to do with ASP.NET, I thought I can learn that too. Do you know any URLS to do with ASP.NET which I can take a look at?

Brandoe85
07-07-2006, 04:57 PM
You can do it using OleDB. Dump your excel data into a dataset, once that's filled, loop through it and insert it into your DB.

This should get your started:
http://forums.asp.net/thread/1315350.aspx

Good luck;

chelvis
07-08-2006, 03:05 PM
Thank you very much Brandoe85 for giving me the URL. I appreciate it.