Forum Moderators: open
trying to output these reports to excel, passing the tables i need to request.form from the previous page.
this works on excel 97, and XP but in excel 2k it pops a little dialog saying
"Transferring"
with a progress bar named the report path..
excel fires up but the book is empty.
code is
<%
Response.ContentType = "application/vnd.ms-excel"
for each nm in request.form
response.write "<table border=""1"">" & request.form(nm) & "</table>" & "<br />"
next
%>
cant see why?!
if i comment out the contentType it happily chucks out the html.
using the script above the page generates (if i comment out the contentType) a normal table.
which is what i want, it has a tbody, trs, ths, tds..etc
If i comment out the response.write and simply put the HTML of generated table in the page pops up happily in excel2k.
however, if i use response.write of the form as above, exccel 2k refuses to show anything at all..
how can the exact same code, first generated with a response.write, not show, and the exact same, in raw HTML works fine?!?!?!?
this is driving me completely spare..
any help greatly appreciated.
this code is for a Reportgrid...and you don't neccessarily have to display it in order to load one...and doing this way maybe a lil more straight forward...hope it helps...