By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,180 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,180 IT Pros & Developers. It's quick & easy.

Exporting Excel Data To SQL 2000 through asp.net

P: 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
time.
Kindly help
Amit

Feb 3 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hi,
convert the excel to xml using dataset.writexml proper and try....

hope u get the solution

Feb 3 '06 #2

P: n/a
I have tried the same way but its taking almost the same time.

Feb 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.