• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP to Excel  RSS feed

 
brisk rook
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP application on Tomcat & Apache.We are using JDBC for database connectivity.
The front end is in JSp & there's one main/central JSP which handles the user requests & manipultes them in the backend & responds back to the browser.
There is one webpage in which a table is displayed(based on users request). There is an option in the page to save this table as an EXcel spreadsheet. Till this point everything's ok, but when the table is being saved as an Excel then the values of few columns are abruptly getting changed(different from the values displayed in the webpage).
The problem here's this is an application already being deevloped by someone else. I took over him after he left & i really need to rush up the things to fix this.
plz suggest me a quickest way to locate jsp/servlet which does the conversion. I looked at a jsp file named saveTable.jsp which does this. but there's nothing significant in this..here's the
code.
<% /**
Description:
Send table as tab-delimited text so browser
will prompt user to open or save.
*/ %><%@ taglib uri="jdeep.tld" prefix="jlb" %><%
response.setContentType("application/vnd.ms-excel");
String tableModel = request.getParameter("tableModel");
if(tableModel == null | | "".equals(tableModel) | |
"com.objx.protex.view.CETable".equals(tableModel)) {
tableModel = "com.objx.protex.view.RETable";
}
Object table = "table"; //hack for Tomcat3.2.1 bug: can't cast String to Object
%><jlb:createTable
id="table"
input="<%= tableModel %>"
scope="session"
sortable="true"
resetSortOrder="false"
force="true"
/><jlb:viewTable
table="<%= table %>"
tableFormat="tab"
applyFormats="false"
/>
 
Micah Kornfield
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might not be as elegant, but you could generate the comma delimited file in a loop and post that to the screen for the user to save.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!