Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Exporting Excel Data To SQL 2000 through

Thread Tools

Exporting Excel Data To SQL 2000 through
Posts: n/a

Hi Experts,

I have been struggling on this problem since last one month. I have a
huge Excel sheet (Not well formatted) with around 10000 records or
more. with around 60 fields.
I want to transfer those rows in sql server as it is. The table in SQL
has got diffrenter field names than this excel field names.

It has got Title of the Sheet in A1
Sub title in A2.
Then 3-4 Blank rows below it.
Then the header row starts from column 3. i.e. From C-5.

Currently I am looping through all the records of the datatable Dataset
in which excel is read using odbc. and in a loop i am calling a stored
procedure for inserting one record at a time.
So process is very slow.
Is there any other way to export data from excel to sql; I can not use
DTS as sheet is selected by the user.

One more way I have tried i.e. I have converted dataset into xml using
DataSet.GetXML() method. and passed the xml as string to sql . open xml
method in sql i tried to insert the records which also taking same
Kindly help

Reply With Quote
Posts: n/a
convert the excel to xml using dataset.writexml proper and try....

hope u get the solution

Reply With Quote
Posts: n/a
I have tried the same way but its taking almost the same time.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting strange characteres to Excel from SQL Server junk.rail ASP .Net 1 07-13-2010 02:14 PM
Exporting to Excel using new version of Excel Doogie ASP .Net 1 11-19-2008 09:10 PM
Pie chart: 2.0, SQL Server 2000, Excel 2000 C Did ASP .Net 3 06-20-2006 08:35 AM
Uploading Data From MS Acess 2000 ti SQL server 2000 =?Utf-8?B?Z2F1cmF2?= ASP .Net 2 01-09-2006 02:42 PM
exporting an excel file from database; making changes to excel file and updating the database by importing it back Luis Esteban Valencia ASP .Net 1 01-12-2005 12:28 AM