How to avoid Special sheets not exist / tFileInputExcel

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!