Hello
How do i export the table to the excel spreadsheet? i need to export the table below to the excel spreadsheet... i need to click on an image that can link to show the table on the spreadsheet...but how do i do that?
or do i need to do it in another asp page..
IF CustQuery.EOF Then
%>
<tr bgcolor="#FFFFFF" height="5">
<td><font face="Arial" size="2">No records for this Month</font></td>
</tr>
<%
Else
'Tells the browser to open excel
If(rowCount MOD 2 = 0) Then
%>
<tr bgcolor="#FFFFFF" height="5">
<td><font face="Arial" size="2"><%=CustQuery("Given_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Family_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Company_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("BusinessPhone")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Email")%></font></td>
</tr>
<%
Else
%>
<tr bgcolor="#EFEFEF" height="5">
<td><font face="Arial" size="2"><%=CustQuery("Given_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Family_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Company_Name")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("BusinessPhone")%></font></td>
<td><font face="Arial" size="2"><%=CustQuery("Email")%></font></td>
</tr>
<%
'CustQuery.MoveNext()
'Loop
End If ' end for rowcount
rowCount = rowCount + 1
End If
Next
CustQuery.Close
Set CustQuery = Nothing
<a href="<%Response.ContentType = "application/vnd.ms-excel"%>" onmouseout="return window.status=''" target="_blank">
<img border="0" src="images/xl.gif"></a><font face="Arial" size="2"><b>Export list to Excel</font></b></tr>
i am refering to the code below...but still don't get it....
http://www.codeave.com/asp/code.asp?u_log=40