Export results to Excel

C

Carpie

I am using FP2000 connecting to an Access2002 database. I have created a search page which queries the database based on the criteria entered and returns the results. Is there a way that the end user could then export the resulting records to an excel file?
 
K

Kathleen Anderson [MVP - FP]

Displaying FrontPage Database Results as an Excel Spreadsheet
The FrontPage 2000 Database Results Wizard (DRW) allows you to query
information in a database and display it as an HTML table. You can also
display the information as an Excel spreadsheet within the user's browser
(if the user is running Internet Explorer and has MS Excel installed on
their machine). The user can analyze the DRW results with Excel and save the
results as an Excel spreadsheet.

http://home.att.net/~codelibrary/FrontPage/excel.htm
 
C

Carpie

Thank you for your help Kathleen. I am now able to have the results feed into an excel spreadsheet if I call the page including the Excel call right after submission of the search criteria. However, I would like the results of the search criteria to still show as a web page but to THEN have the option to export to Excel.

I have my search results page with a button to "Export to Excel" (which is just the search result page again with the Excel calls). My problem is that I can't seem to get the criteria from the search form to carry over to the Excel export.

It's a little complicated to explain so let me try to define it more. My 1st page is the search page (let's say search.asp) and it asks you for a Name (iname). You hit submit and it shows you all the records from a database where Table.Name LIKE '%::iname::%'. This page (let's call results.asp) obviously filters down the number of records. On this results page, I have a button "Export results to Excel" which submits to results-excel.asp. Results-excel.asp is just a copy of results.asp but with the Excel calls. The problem is that Results-excel.asp is returning ALL records from the database rather than WHERE Table.Name LIKE '%::iname::%'. It seems that ::iname: is not carrying across to the third page.

How would I get the '::iname::' input field from search.asp to carry over through results.asp to results-excel.asp?
 
K

Kathleen Anderson [MVP - FrontPage]

You should be able to modify the query in results-excel.asp so it looks just
like the query in the results.asp page. Flip to HTML view and look for
s-sql= in the gray colored code.


--

~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
 
C

Carpie

The query in results-excel.asp are the same as results.asp. It's just that the query in results-excel.asp doesn't seem to recognize the parameters sent from two pages ago in search.asp. If I have a text box in search.asp named "itext" and have the form go to results.asp, should I be able to click submit from result.asp (pointing at results-excel.asp) and have results-excel.asp recognize "itext"?
 
T

Thomas A. Rowe

You need to store the values in a session, then retrieve them when you run
the export to Excel function.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================


Carpie said:
The query in results-excel.asp are the same as results.asp. It's just
that the query in results-excel.asp doesn't seem to recognize the parameters
sent from two pages ago in search.asp. If I have a text box in search.asp
named "itext" and have the form go to results.asp, should I be able to click
submit from result.asp (pointing at results-excel.asp) and have
results-excel.asp recognize "itext"?
 
T

Thomas A. Rowe

On the first page that you past the value to do:

<%
Session("name") = request.form("name")
%>

Then on the page that generates the Excel output

<%
name = Session("name")
%>
--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Top