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 February 1st, 2005, 01:14 AM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting xl sheet names from asp???

Hello guys..:)

 I hv got a problem in accessing the excel files from asp.

 For some reason I need to read the excel files regardless of its sheet names.

 Iam using the ADODB connection to read the excel files.

 Though I can get the sheet contents by using the query

  "SELECT * FROM [sheet1$]"

 I need the sheet1$ dynamic.

 for example
  "SELECT * FROM [sheet(0)]"

 So that even if the sheet name changes I should be able to get the contents in it.

  Any Idea??

  All suggessions will be appreciated.

Thanks



Shibu Narayanan
Software Associates
__________________
Shibu Narayanan
Software Associates
 
Old February 1st, 2005, 08:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

When it comes time to query, it can't be dynamic; you can have the "select * from sheet" string as static, and add the number when you go to query; but when you go to pass it to the database; you have to have a definite sheet number.

Brian
 
Old February 1st, 2005, 05:47 PM
Authorized User
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

There is a way to find out the Active Sheet name at runtime. But that includes Excel COM component. If you can't find any other way to solve it, then you may try to use Excel COM object.



Hope It Helps !!
Bhaskar Ghosh





Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Workbook,Copy Sheet,Move Sheet, Close/Save ptrussell2009 Excel VBA 0 June 13th, 2008 02:28 PM
Reading all sheet list in ASP tamngs Classic ASP Components 0 March 28th, 2007 09:35 AM
Copying Xl sheet from one Xl file to another kesavan Excel VBA 1 July 3rd, 2006 10:11 PM
How to Get Table Names in ASP using ADO ramk_1978 ADO.NET 2 October 26th, 2004 03:31 PM





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