While working on different projects I needed to export the Excel file content into a database. In fact this is not a big deal but in some cases the process requires a lot steps like creating tables in the database prior to the export with necessary number of colomns and other manual steps. Thus, I have created the Excel2DB Java application to simplify the process. The App allows to make a connection to a database, create tables with necessary number of columns and populate the tables with Excel files content.


Now the following functionality is implemented;
  • The properties file is used to define settings for a database connection point and specify files to export
  • Interfaces are implemented to populate tables in Postgres, Oracle and MongoDB databases
  • Both xls and xlsx Excel formats are supported. The app will detect a format automatically. No special settings are required in the properties file
  • If several files are specified in the properties file those files will be processed in parallel by starting several threads

Most recent versions;
  • Version 3.0 : September 3rd, 2017 : MongoDB implementation is added.
    • The zip file is HERE. The zip file contains the jar file, initial settings file and the test Excel file. GitHub code is HERE


Steps to run the application;
  • Configure the properties file.
    • Specify type of database - Oracle, Postgres or MongoDB
    • Specify files you want to export to a database via a comma separated list
    • Specify database connection parameters
  • Run the application. Execute "java -jar excel2db-<version>.jar" from the command line. Java should be pre-installed.
  • The tables with the same names as the files (without extensions) will be created and populated in the database.

Stack used; Java 8, Spring, Apache POI, Gradle


Please help me to improve the application. Your feedback is welcome. Please either send your comments or submit issues/wishes on the github page .

Yours, Andrey Bespalov, 2016-2017.