Forum Moderators: open
<%@language="vbscript" codepage="1252"%>
<html>
<head>
<title>Claim List</title>
<meta http-equiv="Content-Type" content="application/vnd.ms-excel" />
</head>
<body>
<table border="1">
<%
for y = 1 to 50
response.write "<tr>"
for x = 1 to 6
response.write "<td>blah blah blah</td>"& vbcrlf
next
response.write "</tr>"
next
%>
</table>
</body>
</html>
obviously im doing somethign wrong..?!?
any further advice would be much appreciated.
tia
at the moment our system has most of the reports on the web, however we now need (some of) them to be out put in excel form.
is it possible to, from the existing reports simply pass through the table (html table) data through to an asp page, ready to show the same stuff in excel form?
this would save me rewriting all of the reports to come out in excel..
i can mbe see two ways for this, but neither seem any good...
parse my way through the current page, writing the table HTML to a temp file, then reading it back in via the page that outputs the Excel.
alternatively, pass the table html through via the request.form ..
any other ideas.?
It uses a querystring xl=1 to select the excel report.
The puts the content-type selection in an if statement:
if xl = 1 then
response.content-type = application/vnd.ms-excel
end if
(Syntax may not be correct as I'm typing it from memory)
Any parts of the page you don't want to include in the excel file put in an ASP if xl <> 1 then end if block.
im still having slight problems with this.
ended up passing the table data through to a popup page, (frames so didnt want it to be in one). problem is there seems to be an erroneous 0 sat at the top of the page, where has this come from? and how do i get rid of it.
and still i am getting an excel window popping up along with the window i want.
obviously styles wont work , but i can still use <b> and <i> etc?
tia