By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,653 Members | 1,483 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,653 IT Pros & Developers. It's quick & easy.

how to put data to excel sheet in jsp?

P: 24
I am creating an application which maps the consumers data usage..
When I enter counsumer no. it gives me his usage details(time,day,duration,data usage,etc...)
in two separate sections as A)night unlimited and B)Day usage...

It gives me both the data from database....

Now there is a button below (create excel sheet)..
On clicking it it should create an excel sheet of data in the night unlimited and Day usage simultaneously..
How to do that???

Should I again take data out from database and give it to create excel or can you just print rows and cloumns from the page which gives consumer details....
May 24 '13 #1
Share this Question
Share on Google+
3 Replies


Nepomuk
Expert 2.5K+
P: 3,112
Hi!

I'm not sure I understand your question correctly; what is the difference between the two alternatives?
One resource that may be helpful to you is the Apache POI project, which will allow you to write Excel files from Java and should in some form work from JSP. Not having used it myself though, I don't know the specifics.
May 24 '13 #2

P: 24
I want to take out each row and column displayed on the page and put it to excel sheet the way I want it.

How can i do that?
May 24 '13 #3

Nepomuk
Expert 2.5K+
P: 3,112
The APIs you will probably want to use there are HSSF or XSSF from the Apache POI project. You'll probably end up having a for loop with which you take every row from the JSP and call a POI command to put it into the Excel spreadsheet. Maybe there's a shortcut, without having used POI I can't say for sure. But if you follow that link, you should hopefully find all the information you need.
May 24 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.