5
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by kumar pushkar
0

You need to find a way to read the excel file. Once you do that, then it is easy. Call methods that save values to the database and pass as arguments the values read from the excel.

You will need 2 different things. Write methods that write to the database.
Find a way to read the contents of an excel file.

What exactly is your problem?

0

i have this excel sheet names "marks.xls". The xls file consists of marks of students. I want to add these marks to the mysql database.
I read somewhere that it is better to convert the xls file to cvs format and then insert it into the database from the cvs but i m not getting any success. Please suggest.

0

Where are you having problems:
- Convert excel to csv
- Read values
- Save to DB

Those are different unrelated issues. You can do one without having done the other.

0

that would be best. Even better would be to not use a JSP at all for it.

Well if you need to upload file where only registered users are allow to do so you will need JSP or JSF...

1

Well if you need to upload file where only registered users are allow to do so you will need JSP or JSF...

Nope. Use an html page to allow entering credentials and upload information for the file, which is submitted to a servlet.
You could conceivably use a JSP to display the results of the operation (maybe a tabular view of the data inserted) but that's not part of the "upload data" requirement.

0

Hey Peter..
I downloaded the POI package and directly uploaded the file to the db...Thnx...

0

After uploading a excel file from jsp then send to servlet now how to get details from excel file in servlet .........from any drve likec://my.xls is working fine but i dont want to save just get the data and update db thats it...but i am not able to do that plz show the code ho to make a xl file in servlet from input stream ...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.