How to avoid Special sheets not exist / tFileInputExcel

Highlighted
One Star

How to avoid Special sheets not exist / tFileInputExcel

Hi,
I'm having a little trouble with the tFileInputExcel component. I have a number of excel files which have 2-6 sheets and I want to edit them (change a few values via tmap) and extract them into single csv files. This means one subjob only reads one sheet of a number of excel files. My problem is, the sheets which I entered into the sheet list may not exist in every excel file and if they don't the whole subjob dies with the error "Special sheets not exist!".
Is there a way to avoid this problem e.g. an ignore error switch?
tFileList -> tFileInputExcel -> tMap -> tFileOutputDelimited
I'm using Talend with Java.
Thanks for your help,
Hamburg
One Star

Re: How to avoid Special sheets not exist / tFileInputExcel

I would use a tJava after the tFileList and use jExcel (which Talend use internally) to check if the sheetName exist for the current file.
http://jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/Workbook.html
One Star

Re: How to avoid Special sheets not exist / tFileInputExcel

Hi,
thanks for your idea but I'm not quite sure I understand how exactly that would work.
tFileList -> tJava -> tFileInputExcel ... ?
Could you perhaps give a short example?
-
Never mind, I found an 'old' topic where an equal example is given.
Thank you very much!

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now