CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 passing grid results to excel

Print topic Send  topic

Author Message
Mike Singleton
Posted: 05/01/2003, 5:41 AM

I am using this:
<a href="ExportExcel.asp?{FormParams}">Export To Excel</a>

In the Page_AfterInitialize() event this is what I have.

Response.Contenttype="application/vnd.ms-excel"
'This line changes the name of the excel file on most versions to
'something easier for the user.
Response.AddHeader "Content-Disposition", "filename=xlexport.xls"

NO data is being passed through, though. What am I fumble fingering??
No Name
Posted: 05/01/2003, 6:49 AM

Creating MS Excel files with CodeCharge:

http://www.gotocode.com/art.asp?art_id=49&)
Jovita
Posted: 05/01/2003, 8:21 PM

When I try to pass grid results into MS Excel, the out put is not what I expect. Let me explain. I'm using the bugs app. Let's say there are 100 records in the DB and 20 records per page. Now, I search for ONLY the "HIGH" priority bugs ASSIGNED TO John Doe. Let's say 5 records are returned. When I hit the "Print this to excel", what I get are the 20 records mentioned above instead of the 5!!

How do I print the search results (5 records) and not the default...?

Please, help
rrodgers
Posted: 05/03/2003, 4:35 AM

>>How do I print the search results (5 records) and not the default...?

You need to pass your search fields on to the excel export page(usually on the url). Then that grid (that you are using to export to excel) needs to have the same where clauses as the page that you displayed the 5 records.

rob
rrodgers
Posted: 05/03/2003, 4:39 AM

>>NO data is being passed through, though. What am I fumble fingering??

Are you still having trouble? Do you have an example site?

rob
Mike Singleton
Posted: 05/05/2003, 12:45 PM

1. default.asp page link to export.asp
<p align="center"><a class="ClearDataLink" href="{export_Src}">{Export to
Excel}</a> </p>

Data properties
Link:Export Href Source export.asp
Get and Post

2. export.asp page details
Server On Initialze View
'Custom Code @3-73254650
Response.Contenttype="application/vnd.ms-excel"
'This line changes the name of the excel file on most versions to
'something easier for the user.
Response.AddHeader "Content-Disposition", "filename=xlexport.xls"
'End Custom Code



   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.