I was develop a report section in my project where the output is converted from
jsp to excel format and i was succesful to develop that.
But now a days we can use OpenOffice and then i face a problem,because i'm unable to generated output from
jsp to OpenOffice. In Excel my code like bellow....
<%@ page contentType="application/vnd.ms-excel" %> <%@ page language="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<html>
<head>
<title>WCT Report</title>
</head>
<body>
<table>
<tr><th colspan="4"><b>WCT Report</b></th></tr>
<tr>
<th>Vendor Name:</th>
<th>State:</th>
............
...........
</tr>
<% PreparedStatement ps=null;
Connection con=null;
ResultSet rs=null;
int m=0;
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@172.16.90.139:1531:PROD","apps","apps");
String f_date=request.getParameter("f_date");
String t_date=request.getParameter("t_date");
ps=con.prepareStatement("...............");
ps.setString(1,f_date);
............
............
while(rs.next())
{ %>
<tr>
<td><%= rs.getString(1) %> </td>
..................
...................
</tr>
<%}
%>
</table>
</body>
</html>
Please help me to give your valuable suggestion......