XLS or XLSX files

One Star

XLS or XLSX files

Hi,
I receive (by tFTPGet) excel files to read with Tos. These excel files can be xls ou xlsx.
I must open each excel files with tFileList+tfileInputExcel to read the first line of each file for a tSetGlobalVar.
Is it possible, in a tFileInputExcel to read indifferently the both format ?
Thank you for answers,
Quartz
France,Paris
One Star

Re: XLS or XLSX files

Hi Quartz,
Unfortunately you cannot determine the type of excel file Talend is reading in runtime. This is because other code is generated for xlsx than there is for xls.
You could however split the job, choosing a lane for xls and another one for xlsx. If the schema of both files is the same you could output both to an tHashOuput or an intermediate file, and then rejoin them later on.
Hope this helps!
Regards,
Arno

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog