Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Filterning with HTML


Hello,

I am trying to use Excel to keep track of a database (I know, not
exactly what it is designed for). Anyway, this DB will be accessed by
the user using an HTML interfac. My question is, is there a way to call
up the DB showing only the entries that meet a user-defined criteria? I
asume this will involve auto filter on the selected columns of
information.

Please let me know if this is vague and further information is
required.

Thank you,
Jeremy


--
jeremy.watson
------------------------------------------------------------------------
jeremy.watson's Profile: http://www.excelforum.com/member.php...o&userid=23784
View this thread: http://www.excelforum.com/showthread...hreadid=374422

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Auto Filterning with HTML

Jeremy,

This is too big a topic to give you an exhaustive answer, and most people
here work on the Excel interface rather than the web tier, but in concept
you can...

Use ADO to return data from the db file held in a closed Excel workbook to
your web interface as a recordset
This should allow you to use SQL queries to select the subset of data that
you want. e.g.

I have a file saved with the top row containing column names, one of which
is called ItemValue, with values underneath.

Option Explicit
Option Private Module

'add a reference to Ms ActiveX Data Objects library to your project

Sub GetRs()
'all these would be variant in asp
Dim rsData As ADODB.Recordset
Dim strPath As String
Dim strFile As String
Dim strCon As String
Dim strSQL As String
Dim con1 As ADODB.Connection

'replace with createobject in asp code
Set rsData = New ADODB.Recordset
Set con1 = New ADODB.Connection
strPath = "C:\My Documents\My Excel Files\Temp\TestRS.xls"

'your asp page would theoretically create the SQL string that is used here
strSQL = "SELECT TOP 10 ItemValue FROM [Sheet1$] ORDER BY ItemValue DESC"

strCon = "DRIVER={Microsoft Excel Driver (*.xls)};ReadOnly=1;DBQ=" & strPath
con1.Open strCon
rsData.Open strSQL, con1, adOpenStatic, adLockReadOnly, adCmdText
Debug.Print rsData.RecordCount 'shows you got data back
'DO SOMETHING WITH THE VALUES YOU HAVE RETRIEVED
Set rsData = Nothing
Set con1 = Nothing
End Sub

Robin Hammond
www.enhanceddatasystems.com

"jeremy.watson"
wrote in message
news:jeremy.watson.1pnvue_1117148705.2549@excelfor um-nospam.com...

Hello,

I am trying to use Excel to keep track of a database (I know, not
exactly what it is designed for). Anyway, this DB will be accessed by
the user using an HTML interfac. My question is, is there a way to call
up the DB showing only the entries that meet a user-defined criteria? I
asume this will involve auto filter on the selected columns of
information.

Please let me know if this is vague and further information is
required.

Thank you,
Jeremy


--
jeremy.watson
------------------------------------------------------------------------
jeremy.watson's Profile:
http://www.excelforum.com/member.php...o&userid=23784
View this thread: http://www.excelforum.com/showthread...hreadid=374422



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from processing HTML? IE paste raw html. nick Excel Discussion (Misc queries) 2 April 21st 23 05:12 PM
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
Save As to HTML and auto-refresh daveywilson Charts and Charting in Excel 0 March 18th 05 04:33 PM
Auto Edit HTML Page SpaceCamel Excel Programming 3 August 20th 04 11:52 PM
auto save with variable name with html extension Jason[_29_] Excel Programming 0 May 25th 04 03:40 AM


All times are GMT +1. The time now is 10:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"