Mike Singleton
|
| Posted: 04/29/2003, 8:00 AM |
|
Ok.. been covered before.. I just don't see all the options in CCS v2.0..and the custom code below doesn't work....
Page: defalt
Event: Server (on initialize view)
'Custom Code @713-73254650
'No Header or Footer needed
sHeaderFileName="<a href="ExportExcel.asp?{FormParams}">Export To Excel</a>
"
sFooterFileName="<a href="ExportExcel.asp?{FormParams}">Export To Excel</a>
"
'Change HTML header to specify Excel's MIME content type
Response.Contenttype="application/vnd.ms-excel"
|
|
|
 |
rrodgers
|
| Posted: 04/29/2003, 8:08 AM |
|
That works for me. Except where the user has not upgraded the Office to the latest Service Pack. Some people also get a login box but that is because of a problem with office and goes away if the user updates to the latest service pack. I have tested with Office 97 - Office XP (or 2002 depending on what dialog box you prefer).
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"
|
|
|
 |
Mike S.
|
| Posted: 04/29/2003, 12:01 PM |
|
Do you link to a separate page, or a button??
|
|
|
 |
Mike Singleton
|
| Posted: 04/29/2003, 1:44 PM |
|
works... except that none of the grid results get passed through to the page.. utterly blank.
|
|
|
 |
|