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

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 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog