One Star

[resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi
I've to read an Excel file from 4th sheet.
The number of sheets is not defined.
Is it possible to read the sheets after/from 'n' position ?
How to specify a regular expression for the sheet name ?

Thanks a lot
msomso
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi
It is impossible to indicate the position with Regex, the regex is only available for sheet's name. In your case, you can use a tLoop to start n position. please see my screenshot.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
12 REPLIES
Community Manager

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hello
Is it possible to read the sheets after/from 'n' position ?
How to specify a regular expression for the sheet name ?

Yes, you are able to read from 'n' position with a dynamical setting or specify a regular expression. please see my screenshot.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi,
I'm not used to manage the regular expressions.
Could you explain "shon\\w"?
How is defined your expression ?
Where can I find any doc about it ?
Thanks in advance
msomso
Community Manager

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi
See
http://www.regular-expressions.info/reference.html
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi
Yes, REGEX expressions work well on the sheets names, but not for sheet's position.
To read from 3th to 5th sheet, I tried : "////" or "(" or "" or
And il doesn't work
Exception in component tFileInputExcel_2
java.lang.RuntimeException: Special sheets not exist!

When I try to read only one sheet with : \\\\ I've the syntax error : "Name is expected".
and with I've a syntx error.
What's wrong ?
Is it possible to indicate the position with REGEX or only the sheet's name ?

Regards
msomso
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Any idea ?
Community Manager

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Hi
It is impossible to indicate the position with Regex, the regex is only available for sheet's name. In your case, you can use a tLoop to start n position. please see my screenshot.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Thanks a lot
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Salut , svp j'ai des fichiers excel contient plusieurs feuilles je doit extraire juste 4 feuille qui n'ont pas la meme structure donc j'ai fait pour chaque feuille tfilrinputexcel mon probleme j'arrive pas a lire la derniere feuille
Exception in component tFileInputExcel_4
java.lang.RuntimeException: Special sheets not exist!
at excel.test_0_1.test.tFileList_1Process(test.java:10004)
at excel.test_0_1.test.runJobInTOS(test.java:10841)
at excel.test_0_1.test.main(test.java:10709)
voici mon job et le composant qui contient l'erreur
Seventeen Stars

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

There is an alternative to using regex to find particular sheets. The component tFileExcelSheetList lists all sheets and you can easily iterate through all sheets and decide what to do with it.
You need tFileExcelWorkbookOpen and to read one sheet (also with more flexibility) with tFileExcelSheetInput.
These components are freely available in Talend Exchange - a finger tip in your Studio ;-)
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

ok merci, svp comment je peux extraire qcq lignes avec tfilterrow??
Seventeen Stars

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

Sorry, I do not understand Frensh. Could you please write it in English?
One Star

Re: [resolved] [TDQ 4.1.1] tFileInputExcel regular expression for sheet name

ok, I have a problem that I can not currently display the last lines