M
Michael White
HI All..
I have an asp page that queries a database and displays a report. There is a
button on this page that I would like to dump the report into Excel. The
code behind the button:
var xl = window.open("/reportexport.asp", "_blank");
and a new window is displayed with excel. Now the problem is how do I get
the report html into this new window?
xl.document.write(window.document.body.innerHTML); is obviously not the way
since it doesn't work.
reportexport.asp contains only two lines:
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "filename=report.xls;"
Any help will be appreciated..
Thanks
I have an asp page that queries a database and displays a report. There is a
button on this page that I would like to dump the report into Excel. The
code behind the button:
var xl = window.open("/reportexport.asp", "_blank");
and a new window is displayed with excel. Now the problem is how do I get
the report html into this new window?
xl.document.write(window.document.body.innerHTML); is obviously not the way
since it doesn't work.
reportexport.asp contains only two lines:
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "filename=report.xls;"
Any help will be appreciated..
Thanks