p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2005, 01:46 AM
Authorized User
Points: 80, Level: 1
Points: 80, Level: 1 Points: 80, Level: 1 Points: 80, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Delhi, Delhi, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 30th, 2005, 12:11 AM
Friend of Wrox
Points: 945, Level: 11
Points: 945, Level: 11 Points: 945, Level: 11 Points: 945, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: , , .
Posts: 178
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old April 30th, 2005, 02:03 AM
Authorized User
Points: 80, Level: 1
Points: 80, Level: 1 Points: 80, Level: 1 Points: 80, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Delhi, Delhi, India.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx dear , i will try to implement it,

thanx for your response

Rajiv

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview data export to excel sheet abhishekkashyap27 C# 2005 1 August 1st, 2008 11:10 AM
Reading Excel Sheet on client side vinod_yadav1919 Javascript How-To 4 September 27th, 2006 06:12 AM
Importing data from excel sheet to databaase jvraman SQL Server 2000 3 May 12th, 2006 01:00 AM
Exporting data to excel sheet x_ray VB.NET 2002/2003 Basics 0 January 6th, 2006 03:14 PM
Update Access data from excel sheet Swift_PC Access VBA 1 October 20th, 2004 02:51 PM



All times are GMT -4. The time now is 01:48 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc