For whatever reason my jsp won't open in excel, it just keeps rendering in the browser.
have a look, seems straightforward enough, any thoughts would be appreciated.
thx Mike
<%@ page language="java" import="java.util.*" %>
<%@ page import="com.****.*****.bsc.bo.*"%>
<%@ page contentType="application/vnd.ms-excel" %>
<% response.setHeader("Content-Disposition", "attachment; filename=\"bsc.xls\""); %>
<%ArrayList al = (ArrayList)request.getAttribute("METRICVALUES");%>
<table>
<%
out.println("<tr>");
out.println("<td>METIRC ID</td>");
out.println("<td>DATE CHANGED</td>");
out.println("<td>USER CHANGED</td>");
out.println("<td>EMAIL</td>");
out.println("</tr>");
String email;
DataEntryContacts dec = new DataEntryContacts();
for(int i=0; i < al.size(); i++) {
dec = (DataEntryContacts)al.get(i);
email = dec.getEmail();
if(email == null) {
email = "";
}
out.println("<tr>");
out.println("<td>"+dec.getMetric_description()+"</td>");
out.println("<td>" +dec.getDate_changed()+"</td>");
out.println("<td>" +dec.getUser_changed()+"</td>");
out.println("<td><a href=mailto:"+email+">" +email+"</a></td>");
out.println("</tr>");
}
%>
</table>