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
|
|
|
 |