I need to upload data in an excel sheet to the database using java.
The database will be oracle.
The excel sheet will be uploaded once in a month by a user using a web application (Spring MVC front end).
The excel sheet will be having thousands of records/rows e.g. around 15000 or more.
- What is the fastest way to upload this huge data in database? We are
using simple JDBC (Spring’s JDBC Template). - How do we handle transaction sand errors as there can be errors while uploading data in which case the partly uploaded data will be useless?
- We need to able to notify the user of the error so that he can
correct the excel sheet and try again?
Please help/
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.