Wrox Programmer Forums
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 26th, 2005, 12:46 AM
Authorized User
Join Date: Apr 2005
Posts: 22
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
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 ,


Old April 29th, 2005, 11:11 PM
Friend of Wrox
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway

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

         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)


Old April 30th, 2005, 01:03 AM
Authorized User
Join Date: Apr 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts

thanx dear , i will try to implement it,

thanx for your response


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Excel Sheet on client side vinod_yadav1919 Javascript How-To 7 December 8th, 2009 09:13 PM
Gridview data export to excel sheet abhishekkashyap27 C# 2005 1 August 1st, 2008 10:10 AM
Importing data from excel sheet to databaase jvraman SQL Server 2000 3 May 12th, 2006 12: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 01:51 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.