Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Export to Excel

Thread view: 
Sachin - 06 Dec 2005 08:13 GMT
Is there a way to export results generated from a Servlet as a html
table to a microsoft Excel sheet using Java ?
IchBin - 06 Dec 2005 08:56 GMT
> Is there a way to export results generated from a Servlet as a html
> table to a microsoft Excel sheet using Java ?

Think you want to look at Jakarta POI. It provides Java API's To Access
Microsoft Format Files

http://jakarta.apache.org/poi/

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)
IchBin - 06 Dec 2005 09:14 GMT
>> Is there a way to export results generated from a Servlet as a html
>> table to a microsoft Excel sheet using Java ?
[quoted text clipped - 11 lines]
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor,  Regular Guy (1952-)

Here are some articles you may be interested in

http://www.javaworld.com/javaworld/javaqa/2002-05/01-qa-0503-excel3.html
http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html
http://www.devx.com/Java/Article/17301
http://programming.newsforge.com/article.pl?sid=04/10/21/1452220&tid=54

Signature

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)

amitkch@gmail.com - 06 Dec 2005 10:25 GMT
Many ways.
1. Set the content type/disposition header like this
Content-type: text/html
Content-Disposition: attachment; filename.xls
Since excel can open html contents this should work fine.

2. The better way is to output the data in xml format using XSLT or
directly from your servlet in MS-XML document format.

3. Output/convert data in CSV format and save it with .csv extension.

4. You can have a look at POI also.

Amit :-)
Richard Wheeldon - 06 Dec 2005 18:55 GMT
> Is there a way to export results generated from a Servlet as a html
> table to a microsoft Excel sheet using Java ?

http://www.andykhan.com/jexcelapi/

Richard
Roedy Green - 06 Dec 2005 21:04 GMT
>Is there a way to export results generated from a Servlet as a html
>table to a microsoft Excel sheet using Java ?

see http://mindprod.com/jgloss/excel.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.