Load Excel Data into Database in Talend

In this Talend chapter, we show how to load Excel data into a Database table. In Talend, you can load Excel files into database tables in two ways.

  • Drag and drop the tFileInputExcel browse the Excel file, and create a schema for it.
  • Create metadata and use that existing Excel metadata.

In this example, we use the already existing metadata as the Excel source. The following image shows the Excel file data.

Load Excel Data into Database in Talend 0

Load Excel Data into the Database in Talend

First, drag and drop the ExcelData from the File Excel folder into the Talend Job design.

Load Excel Data into Database in Talend 1

Next, drag and drop the tDBOutput from the Palette to the design space. Here, you can also choose the DB Specific output. However, to show the universal option, we have selected the tDBOutput.

Load Excel Data into Database in Talend 2

Within the Components tab, whether you can choose the connection settings or select the connection from the repository.

First, we selected the Microsoft SQL Server as the Database and clicked the Apply button. Next, connected the ExcelData row to DBOutput. Then, we used the existing connection.

Here, we are using the Talend_ExcelData as the destination SQL table name. And we are creating this table if it does not exist.

Load Excel Data into Database in Talend 4

By clicking the Edict Schema button, please check the schema of input an output before running the job.

Load Excel Data into Database in Talend 5

We changed the Lengths of each column so that they can accommodate universal inputs.

Load Excel Data into Database in Talend 6

Please check all the Talend settings before loading Excel data into the Database. Let us run the job.

Load Excel Data into Database in Talend 8

Let me open the SQL Management Studio and check whether the Talend job loaded the Excel data into the Database.

Result Table