0

I want to insert data from a excel sheet to mySql db using JDBC. Instead of generating insert/update statements manually , is there any library I can use of?

I have checked multiple libraries like dbUtils,POI and other but unable to find this functionality.

1
  • I have implemented programs that did this (used JExcelAPI to read the Excel file, and the database was either Postgres or Microsoft SQL Server). As I recall, there was a business-specific API built on Hibernate that I used to persist the data. However, a "generic tool" to take specified rows and columns in Excel and INSERT/UPDATE them into a table might be easier to do in perl than Java. Commented Mar 4, 2016 at 16:14

1 Answer 1

1

AFAIK there is no magic library that will take a Excel Spreadsheet and place it in a database.

You can create the schema in the database for the data and with jooq generate a Java representation of the schema. Afterwards you will have to parse the Excel file with something like POI or jXL. Jooq will help you write the inserts and updates in a more Java friendly DSL manner.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.