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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch