|
|
 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

April 26th, 2005, 01:46 AM
|
|
Authorized User
|
|
Join Date: Apr 2005
Location: Delhi, Delhi, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
reading data from excel sheet
Hi all,
I have a master table employee , which contains the details of employees .
i have to upload the the data to this table from thye excel sheet by using asp.
that is -- what i have to do is , I have to provide a interface to browse the the excel sheet by user , afetr browsing the sheet user will submit the page and i have to read all the rows of excel sheet and update the table . if id exists in the table , then update the data otherwise append the data .
table strucure-----
empid varchar 20
firstname varchar 50
lastname varchar 50
date of joining datetime
city varchar 50
pin varchar 6
phone varchar 20
process varchar 50
sub process carchar 50
email address varchar 50
etc...
there are 20 field to be read from the excel sheet .
any one , help me to achieve this task , i m not getting it , how to do this ,
Rgds
Rajiv
|

April 30th, 2005, 12:11 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Location: , , .
Posts: 178
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Following the script to read data from excel sheet.. You can change it according to your requirement.
set dbExl = server.createobject("adodb.connection")
set rsExl = server.createobject("adodb.recordset")
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=records.mdb ;Extended Properties=""Excel 8.0;HDR=Yes"""
dbExl.ConnectionString = connstr
dbExl.Open
sheetName = "Exl-sheet"
strQry = "select * from ["&sheetName&"$]"
rsExl.Open strQry, dbExl
do while not rsExl.eof
ID = rsExl(0)
FNAME = rsExl(1)
LNAME = rsExl(2)
rsExl.movenext
loop
|

April 30th, 2005, 02:03 AM
|
|
Authorized User
|
|
Join Date: Apr 2005
Location: Delhi, Delhi, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanx dear , i will try to implement it,
thanx for your response
Rajiv
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |