Google Answers Logo
View Question
 
Q: creating an informational web application using MySQL 4.0, JSP, Tomcat ( No Answer,   4 Comments )
Question  
Subject: creating an informational web application using MySQL 4.0, JSP, Tomcat
Category: Computers > Programming
Asked by: adub16-ga
List Price: $55.00
Posted: 26 May 2005 10:08 PDT
Expires: 05 Aug 2005 10:02 PDT
Question ID: 525923
***Outline***
I?m creating an informational web application using MySQL 4.0, JSP,
Tomcat and NetBeans 4.1 IDE.  I want to allow the client to view and
manipulate data in an Excel sheet/workbook after loging into the site.
[everything is on the localhost].

***Summary*** 
The site is almost complete. I am able to make database calls storing
the user information, but I am having issues with importing this same
data to an Excel spread sheet. I?ve created a jsp file called
?export.jsp? that can dynamically display information from the MySQL
database, but I?m not sure how to have the information display in
Excel. Making additions to the content type is not working. This JSP
script listed below  will display a Excel sheet.

<%@ page contentType="application/vnd.ms-excel" %>  
This is a test
1	2	3	4
5	6	7	8

Here are some of the links I looked at.
http://www.oop-reserch.com/mime_faq.html
http://www.theserverside.com/discussions/thread.tss?thread_id=19180
http://episteme.arstechnica.com/eve/ubb.x/a/tpc/f/6330927813/m/486000903731
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=50&t=008904


***Problem/Requirement***
I need a working code for importing dynamic data into an Excel spread
sheet by way of JSP from a MyQL database.

If it can?t be done this way how can I do it dynamically using csv?

Thanks in Advance
Answer  
There is no answer at this time.

Comments  
Subject: Re: creating an informational web application using MySQL 4.0, JSP, Tomcat
From: miland-ga on 30 May 2005 02:17 PDT
 
You can specify application/msexcel content type and generate
CSV-response. For additional formating you can use
http://jexcelapi.sourceforge.net/ or commercial libraries.

Good luck,
Andrew Miliy (ICQ#:38640498)
Subject: Re: creating an informational web application using MySQL 4.0, JSP, Tomcat
From: adub16-ga on 02 Jun 2005 12:23 PDT
 
Thanks for pointing me in the right direcion. I'll keep you posted on
my  progress Andrew.
Subject: Re: creating an informational web application using MySQL 4.0, JSP, Tomcat
From: mrobinson-ga on 05 Jun 2005 09:06 PDT
 
I have a j2ee application that current exports data into Excel, XML,
or CSV format. The key is in using an open source tag library for JSP
called DisplayTag (http://www.displaytag.org/example-export.jsp). This
library's main purpose is to organize tabular data in a nicely
formatted manner. But, in addition is has the exporting functions
mentioned above built in.

For example, here is the code that will display and provide the export
functionality for a two column table.

<display:table class="simple"
name="sessionScope.accountListForm.accounts" id="accounts"
requestURI="accountlist.do" pagesize="15" sort="list" export="true">
<display:column property="accountNo" sortable="true"
headerClass="sortable" href="" paramId="accountID"
paramProperty="accountID"  />
<display:column property="description" sortable="true" headerClass="sortable" />
</display:table>

The results are a formatted table with 3 links at the bottom, letting
the user choose to export in Excel, XML, or CSV format. View the link
above to see similar output.

I cannot speak highly enough of the utility of this tag library. I
suggest you try it even if you use some other means to export.

Regards,
Mike Robinson
Subject: Re: creating an informational web application using MySQL 4.0, JSP, Tomcat
From: shidan-ga on 19 Jun 2005 18:31 PDT
 
Actually excel has a jdbc driver. You can get details on it here:
http://java-source.net/open-source/database-engines/excel-jdbc-driver

Regards,
Shidan G.
shidan at gmail dot c o m

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy