Export to Excel

S

Sachin

Is there a way to export results generated from a Servlet as a html
table to a microsoft Excel sheet using Java ?
 
I

IchBin

Sachin said:
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-)
 
I

IchBin

IchBin said:
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-)

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







--


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-)
 
A

amitkch

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top