I have been given the task of opening xls files in the browser using jsf and oracle, these files are stored in the database.
How do I accomplish this?
Thanks,
Sonia
Viswanath Tg
Greenhorn
Joined: Nov 27, 2007
Posts: 20
posted
0
Step 1 : Load the data to a object of type List
Step 2 : Iterate the list of the object and write the data corresponding to the excel file...
Step 3 : upload the data..
try
{
out = response.getOutputStream();
wb.write(out);
out.flush();
out.close();
}
Required API :: POI
Helping hands are better than praying lips
sonia pandit
Ranch Hand
Joined: Apr 19, 2008
Posts: 137
posted
0
Hi,
I downloaded the poi libraries and put it in eclipse classpath and in the WEB-INF/lib directory.
But I am getting a ClassNotFoundException: org.apache.poi.usermodel.HSSFWorkBook.
Thanks,
Sonia
Viswanath Tg
Greenhorn
Joined: Nov 27, 2007
Posts: 20
posted
0
Hi,
May be configuration is not correct.
or More than one poi.jar is referred.
sonia pandit
Ranch Hand
Joined: Apr 19, 2008
Posts: 137
posted
0
Hi,
I got it to work. But it looks like all the examples produce an excel file. But they don't open in a swing application for editing. or in the browser. Is there such an example?
Thanks,
Sonia
Viswanath Tg
Greenhorn
Joined: Nov 27, 2007
Posts: 20
posted
0
Hi,
I am not clear with your query. can you explain it again.
Regards
Viswanath
sonia pandit
Ranch Hand
Joined: Apr 19, 2008
Posts: 137
posted
0
I am writing a jsf application in which when the user selects a file it is pulled from the database. I want to be able to open the xls file in swing or in the browser. I need an example to do that.
They need to be able to edit and save the xls file.
Thanks,
Sonia
Viswanath Tg
Greenhorn
Joined: Nov 27, 2007
Posts: 20
posted
0
In the previous scenerio when the execl file is populated it will have 3 buttons saying open, save and close
user can click on open and edit the deatils and save.
I will let you know, once i find the solution
Regards
viswanath
sonia pandit
Ranch Hand
Joined: Apr 19, 2008
Posts: 137
posted
0
Thanks, I need it fast though.
Sonia
sonia pandit
Ranch Hand
Joined: Apr 19, 2008
Posts: 137
posted
0
Somebody from the apache mailing list has suggested a Servlet. Trying to figure out how
to map a servlet into a jsf application.