Question Details

No question body available.

Tags

java spring-boot jdbc file-handling

Answers (4)

June 30, 2026 Score: 3 Rep: 21,047 Quality: Medium Completeness: 40%

Do you want to do this using Spring framework or pure JDBC or JPA or something else? What database table[s] are involved? What is the structure of those database tables, i.e. column names and data types. What database are you using? Is it SQL Server? I recommend that you visit Tour and the Help Center and when visiting Help Center make sure you read How do I ask a good question. Then you can edit your question and add the missing details.

June 30, 2026 Score: 0 Rep: 1,193 Quality: Low Completeness: 60%

Assuming you mean a SQL database, you're going to want to prepare a statement like INSERT INTO employees (empId, name, email, salary) VALUES (?, ?, ?, ?) and execute it for each row given that employees is a table that exists. The best way to do that depends on details not provided in your question. If you have no special requirements, JDBC + SQLite may be a good option for example.

June 30, 2026 Score: 0 Rep: 202,116 Quality: Low Completeness: 10%

I would start by opening the file in Excel and exporting it to a CSV and then I would import the CSV. Which, given it contains 1000 records of 4 fields, should take trivial time. Now if it was millions of records I might try and optimize it.

June 30, 2026 Score: 0 Rep: 147 Quality: Low Completeness: 50%

Almost each database has a driver to use with Java. All you need is just to add this library to your project as a dependency in pom. Then you can use the driver's API to establish a connection and perform SQL statements like insert, update, delete . But for this to work, firstly, you have to create a database user, who is able to execute SQL statements, and give that user rights. Also many databases has a predefined superuser, which credentials you might use in you program for database connectivity. Then connect with that user and create a table to hold the data extracted by poi. You can modify your code to include the use of JDBC API, and it will store the data simultaneously.