Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
LVentalon1683201006
Contributor
Contributor

Reading Excel file with multiple sheets

Hello !

I want to develop a job on Talend that will allow me to read an Excel file and supply a mySQL database.

However, the Excel file contains several sheets that don't have the same structure and each sheet must correspond to a table.

I don’t know in advance how many sheets there are in the file.

How to load this Excel file and browse these sheets ?

Thank you in advance for your answers !

4 Replies
Anonymous
Not applicable

Hi @Loréna Ventalon​ , it is impossible to read all sheets that have the different structure dynamically. With open studio, you have to create different subjobs to read each sheet. With enterprise studio, you can create only one subjob to read all sheets dynamically, but the sheets should have the same structure.

Regards

Shong

Jamesserpa
Contributor
Contributor

Hi,

To read an Excel file with multiple sheets and load the data into a mySQL database using Talend, you can follow these steps:

 

Use the "tFileList" component to get the list of Excel files in a directory.

Use the "tFileInputExcel" component to read the Excel file and get the list of sheets.

Use a loop to iterate through each sheet and extract Bookiemarket the data using the "tFileInputExcel" component.

Use the "tMap" component to transform the data and prepare it for loading into the mySQL database.

Use the "tMysqlOutput" component to load the data into the mySQL database.

In Talend, you can use metadata to define the structure of the Excel file and the mySQL database, which can simplify the mapping and transformation steps.

 

To handle different structures for each sheet, you can create multiple "tFileInputExcel" components and configure them to read each sheet separately. Alternatively, you can use the "dynamic schema" feature of the "tFileInputExcel" component to handle variable structures.

 

 

Anonymous
Not applicable

@James Serpa​ , the 'dynamic schema' feature read all the sheets with the same structure, the structure of the first sheet will be used.

LVentalon1683201006
Contributor
Contributor
Author

Thanks for your answers, I will create one metadata per sheet