[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 ?
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
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
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 ?
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
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
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 😉