Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
citrods
Contributor
Contributor

read specific spreadsheets in several excel files

Hello

I have lots of excel files to read.

Each excel files have many speadsheets but I don't have to real all of these spreasheets.

The spreadseehats have different names and I'm intersted in spreashsheets which are named "Year 1990", "Year 1992", "Year 1992" and so on. Not all years exist and I don't know the exact list of years.

Actually I'm interested in spreadsheets whichs contains "Year".

How I can use tfileinput and set the parameters so that I can read some specific spreadsheet?

I know that I can tick a box which will allow to read all spreadshest. I can also write the name of the spreadsheet I want to read. But I want something in between ; just read spreadsheet which contains "year". Is it possible?

thanks

Labels (2)
12 Replies
citrods
Contributor
Contributor
Author

exactly. this is what i figured out to avoiD error message if an excel file doesnt have the worksheet which is named "year XXXX".

Also, the fake spreadsheet doesn't need to contain any data. It can be empty as I don't want to read information from that fake worksheet. just wantto avoid error messages.

 

I'm OK with to other solutions

Prakhar1
Creator III
Creator III

I have one idea where you donot need to add spreadsheet of "Year".

What you can do create a master and subjob concept.

1) Master Job

tFileList -> iterate -> tRunjob

2) Child Job (Subjob)

Create a subjob and create the logic to read the Excel and store the data and then use this job in tRunJob.

in that subjob add a context.FileName and pass this context value using the master job.

Also untick the DieOnError setting in tRunJob

 

By this logic your job will throw the error message but will not fail and continue for the Excel having "Year XX" spreadsheet.

citrods
Contributor
Contributor
Author

I'm a beginner, i didn't understand all theses stuffs😅

what is a master job and what is a child job?

what is contextFILE?

 

do you have a screenshot and all the settings that I have to use?