huzefaq
asked on
how to import data from a table to aan excel file
I have a JSP file where I show member information in a table. Now what I need is a button which when pressed transfers all the data from the table into an excel file. Is there a way I can do that
Any help will be greatly appreciated
Any help will be greatly appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Alternatively, if you already have the information in a JavaBean and all the JSP is doing is displaying it, you can write a servlet to output the data straight to an .xls file using JasperReports. I've started using it, and once you have an idea of what you're doing, it's great. Big learning curve though, and I wouldn't recommend starting to learn it unless you've got a considerable amount of time to spend.
ASKER
Do you guys know anything about display tag. Does anyybody has used that. I would really appreciate if somebody could give more information about it
thanks
thanks
I suggest you two ways for writing data to xls.
1) Just write a simple HTML string and that to browser setting its content type to application/vnd.ms-excel and save that file with .xls extention. The Microsoft Excel is samrt enough which can automatically convert html to its own format.
2) The other way is : I am using a third pary Excel API. and I am sure it will definately help you out.
Java Excel API
http://www.andykhan.com/jexcelapi/index.html
please visit the above url for downloading that api
If you have any qrueries about using that you can direcly ask me.
Regards,
Meritor
1) Just write a simple HTML string and that to browser setting its content type to application/vnd.ms-excel and save that file with .xls extention. The Microsoft Excel is samrt enough which can automatically convert html to its own format.
2) The other way is : I am using a third pary Excel API. and I am sure it will definately help you out.
Java Excel API
http://www.andykhan.com/jexcelapi/index.html
please visit the above url for downloading that api
If you have any qrueries about using that you can direcly ask me.
Regards,
Meritor
There is one Open Source API that I recommend highly
and that is DisplayTag (
http://displaytag.sourceforge.net/11/ )
This is a powerfull and easy to use Tag library with a lot of features.
Regards,
Tomas Helgi
and that is DisplayTag (
http://displaytag.sourceforge.net/11/ )
This is a powerfull and easy to use Tag library with a lot of features.
Regards,
Tomas Helgi
ASKER
in display tag can you show data bt not in a table format
ASKER