Is it possible without uploading excel to the server?
Aneesh.
Main Topics
Browse All TopicsHi Expert,
I have a jsp web page that should allow the user(from user machine) to select an excel file, and pass the file name to java class on click, and parse the excel data and add it to the DB through service classes. How is it possible?
Earliest reply is appreciated.
Thanks,
Aneesh.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You can first upload it as a file.
Using "Apache Commons FileUpload" to read the file stream from server-end then save it as a file locally (server end).
Then you have to use "Apache POI" to do text extraction.
Do u want to do text extraction
or just to save the excel file (original file structure) into database?
Here a simple tutorial
http://www.theasolutions.c
or
Apache Common Upload Homepage
http://commons.apache.org/
Note that HTTP Form must include enctype="multipart/form-da
You will be able to upload files of any format using "Apache Common Upload". The original file structure will be maintain .
And
Apache POI will support *.xls, *.xlsx here a sample code to do extraction
String fileIn = "c:/test.xls";
String fileOut = "c:/test.txt";
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(fileIn));
ExcelExtractor extractor = new ExcelExtractor(wb);
OutputStreamWriter fileWriter = new OutputStreamWriter(new FileOutputStream(fileOut))
fileWriter.write(extractor
fileWriter.close();
Business Accounts
Answer for Membership
by: bluebelldiscoveryPosted on 2008-12-25 at 23:50:46ID: 23244578
1. To send a file over HTTP Post you can use Apache Commons FileUpload fileupload /
You can download the API from here
http://commons.apache.org/
2. To parse excel data (extract plain text from excel) you need to use Apache POI
Download API here
http://poi.apache.org/