Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 30th, 2005, 11:35 AM
Authorized User
 
Join Date: Sep 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default Excel

Hello I really appreciate your help but can you explain that what is “records.mdb” in connstr? if we want to read an excel file than why mdb (Access) fine mentioned here, and where we shall put the excel sheet name? I’ll b thankful to you if you explain me that.
Code is given below
Bye

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


Zaeem Sherazi
__________________
Zaeem Sherazi





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
ASP to Excel - excel output formatting issue mat41 Classic ASP Professional 0 August 13th, 2006 06:41 AM
write multi-sheet Excel w/o Excel.Application manmoth Classic ASP Components 2 November 22nd, 2005 10:56 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





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