•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 391,965 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,129 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 422 | Replies: 0
![]() |
•
•
Join Date: Jan 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
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>![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
Similar Threads
- God-awful lags in Internet Explorer (Viruses, Spyware and other Nasties)
- Norton Update issue. Error - LU1806 (Viruses, Spyware and other Nasties)
- Hacktool.Rootkit Issue (Viruses, Spyware and other Nasties)
- please help!!!!!!! HJT scan attached...! (Viruses, Spyware and other Nasties)
- internet being weird, here's my HJT report & some info! (Viruses, Spyware and other Nasties)
Other Threads in the JSP Forum
- Previous Thread: where to place the db conn code in jsp
- Next Thread: Want a Dummy JSP project for study


Linear Mode