Uploading data from excel file to database using java Uploading data from excel file to database using java database database

Uploading data from excel file to database using java


You can use Apache POI - the Java API for Microsoft Documents for processing the file, and then use plain JDBC for inserting data into your database.

It would be fairly fast, and you can catch all exceptions to alert the user about errors.


What oracle version do you use? If you need just a web application for that use case, maybe APEX can make it being your friend. Starting from Oracle 11g it will be preinstalled along with the database, from 9i you can install it by yourself. It brings a very good integration of excel along thus it will be easy, even for beginners, to create an application in a few days.


As regards the first question, i think that the best solution is to convert excel file in .csv format (comma-separated-value) that is very simple to be parsed. I'm not sure that can help, but I found this link.

For exception handling, have a look to @ExceptionHandler annotation that maybe can help you.