Displaying an Excel sheet in a webpage using JSP / Servlets?
I wanted to write a program in which an Excel sheet is imported into a web page. Also, the appearance of the web page should be the same as on the Excel sheet. The entire excel sheet should be displayed on the webpage.
Is there any package for Java where we can import an Excel sheet and print its data and their sheets on a web page?
a source to share
I have used POI in the past to read and write MS Excel documents, which worked very well: http://poi.apache.org/
So, you will need to write code to load the file, parse it with POI, then you can output it with this: http://www.activewidgets.com/grid/
a source to share
I asked a friend and he said he used this and it worked well if he was here in my favorites.
About display: Well it pretty much depends on the layout / design you want, but I think you can just display it with tables for what they are for.
Edit:
I removed the link as I noticed that this is a deprecated API and is also not what you really wanted. Although the link is in another question here -> http://poi.apache.org/ seems really nice for what you want
a source to share
Apache POI is the right thing to do when it comes to reading a table. We have used it in the past to read / write Excel documents. Of course, there are some drawbacks associated with complex Excel documents.
As far as displaying the Excel document is concerned, you need some kind of interaction with the sheet on the web page. If not, you can convert the Excel sheet to PDF / HTML and display it. You can use the OpenOffice API to achieve this transformation.
Edit: just checked out ZKSpreadsheet ... Cool
a source to share