how to trim dynamic File name for excel sheet name

Highlighted
Eight Stars RAJ
Eight Stars

how to trim dynamic File name for excel sheet name

Hi talend folks,

 

                I know how to generate dynamic File name for excel sheet name using talend. Now i want to know how to trim dynamic File name for sheet name. I need specific character only for excel sheet name. 

 

example :

my excel file name : abcd_20180530_1020

need output for excel sheet name: abcd_20180530

 

Kindly share your information. 

Thanks
RAJ

Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: how to trim dynamic File name for excel sheet name

Assume the Excel filename is in the global variable called "filename", you can do:

((String)globalMap.get("filename")).substring(0, 13)

TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: how to trim dynamic File name for excel sheet name

Assume the Excel filename is in the global variable called "filename", you can do:

((String)globalMap.get("filename")).substring(0, 13)

TRF

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.