struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bhaarat Sharma" <>
Subject Struts 1 - using POI and FormFile to read an excel file
Date Mon, 05 May 2008 22:14:27 GMT

I am currently using Struts 1 - FormFile to uplaod various documents.  Now I
have a requirement to read an excel file as the user uploads it. For this I
am using Apache POI.

this is how poi reads an excel sheet

InputStream myxls = new FileInputStream("workbook.xls"));
HSSFWorkbook wb     = new HSSFWorkbook(myxls);

Does someone know a way so that I can give the FormFile object to the
HSSFWorkBook Constructor?

Basically I will be getting the uploaded excel file from the user as
userObject.getUploadedFile() //which returns a FormFile object.

Thanks for any help!!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message