Hi,
What I am trying to do: Reading an Excel sheet from a remote location and passing it on to a
JSP page.
What I have managed so far: I have managed to read the Excel Sheet from the remote location. This was done using a
Java class and POI.
What I need help with:
1. How to pass the Excel Sheet(retrieved in the java file) to a JSP page which will display the excel sheet. I have researched somethings but am not clear how to go about doing it.
2. I am OK with the JSP page opening the excel sheet separately, but is it possible to display it within the JSP page itself? I was wondering about using iFrames but i think its client side basically. Is it possible to use it in a JSP?
Code Snippets:-
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
//
baos is a ByteArrayOutputStrream whichread the Excel sheet from the remote location.
//
POI Coding to read the excel file
POIFSFileSystem fs = new POIFSFileSystem(bais);
HSSFWorkbook wb = new HSSFWorkbook(fs);
Application FLow:- A HTML(user enters the filename here) ==> passes filename to ==> JSP==> passes filename to ==>Java (retrieves file)
Java==> passes File to ==>JSP : DISPLAYS THE FILE
Thanks in advance.