944,085 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 28479
  • ASP RSS
Apr 16th, 2005
0

Import excel records into ASP database

Expand Post »
Would you please send me a code for importing records in an Excel worksheet into my Asp Application database.

Your earliest response is higly appreciated. Thanking you in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Cadde is offline Offline
2 posts
since Mar 2005
Apr 23rd, 2005
0

Re: Import excel records into ASP database

does this need to be done regularly or is it a once off? if it is once off then what you could do is create a csv (comma deliminated doc) and import it into your database. i am not too sure if it is possible to get asp to do it automaticaly.
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Apr 26th, 2005
0

Re: Import excel records into ASP database

Your best option is always to use the built in import/export functionality that already exists and nearly all database systems. If for some odd reason this is not an option for you, you can connect to an Excel spreadsheet and read the rows of data just like you would any other database. Your DSN-less conenction string would be similar to :

"Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & Server.mappath("./YourSheet.xls") & ";UID=admin;"

Just loop through the recordset, grab the values, then insert them into another db.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jpn311 is offline Offline
9 posts
since Apr 2005
Apr 26th, 2005
0

Re: Import excel records into ASP database

i thought about it, makes sense if the excel doc is in proper format. no cell merges. the excel document would have to be uploaded to the server first, also the server would need to have the excel driver installed (don't think it is preintalled????
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Apr 26th, 2005
0

Re: Import excel records into ASP database

The Excel driver is installed as part of MDAC, which should come pre-loaded on all Windows servers.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jpn311 is offline Offline
9 posts
since Apr 2005
Apr 26th, 2005
0

Re: Import excel records into ASP database

that was fast. ok sorry wasnt sure, thought it came with excel / office.
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Aug 26th, 2005
0

Re: Import excel records into ASP database

Quote originally posted by jpn311 ...
Your best option is always to use the built in import/export functionality that already exists and nearly all database systems. If for some odd reason this is not an option for you, you can connect to an Excel spreadsheet and read the rows of data just like you would any other database. Your DSN-less conenction string would be similar to :

"Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" & Server.mappath("./YourSheet.xls") & ";UID=admin;"

Just loop through the recordset, grab the values, then insert them into another db.
Hi William,

I didn't get exactly the reply u have posted. Could you please eloborate the same and explain us in detailed manner as i am also having the same type of requiremnt and struggling for the same from past long time..Thanks much in advance for your time

Bye
Aravind
Reputation Points: 10
Solved Threads: 0
Newbie Poster
basena is offline Offline
4 posts
since Aug 2005
Aug 26th, 2005
0

Re: Import excel records into ASP database

Quote originally posted by Cadde ...
Would you please send me a code for importing records in an Excel worksheet into my Asp Application database.

Your earliest response is higly appreciated. Thanking you in advance.

Aravind:

The same type of requirement i have with my project. Please anybody help us in this regards at the earliest.

Thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
basena is offline Offline
4 posts
since Aug 2005
Oct 12th, 2006
0

Re: Import excel records into ASP database

Reputation Points: 58
Solved Threads: 1
Posting Whiz in Training
cancer10 is offline Offline
234 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Why this error???Operation is not allowed when the object is closed.
Next Thread in ASP Forum Timeline: ASP Advanced Search





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC