how to trim dynamic File name for excel sheet name

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

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads