Problem in tFileList

Four Stars

Problem in tFileList

I want to process multiple files one by one to merge them into one excel file(xlsx) using tfilelist so i procceded like the sccreenshot but i'm getting this errors:

For input string: "N_Vol"
            For input string: "N_Vol"
 Exception in component tFileInputExcel_1
 org.apache.poi.openxml4j.exceptions.InvalidOperationException: 
 Can't open the specified file: 'C:\Users\dell\Desktop\Data2 - 
 Copie\~$S_1.xlsx'
 at org.apache.poi.openxml4j.opc.ZipPackage.<init> 
(ZipPackage.java:112)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:224)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:186)
at org.apache.poi.POIXMLDocument.openPackage(POIXMLDocument.java:74)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:296)
at tunisair.lig_0_1.lig.tFileList_1Process(lig.java:913)
at tunisair.lig_0_1.lig.runJobInTOS(lig.java:2053)
at tunisair.lig_0_1.lig.main(lig.java:1910)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipFile(ZipHelper.java:174)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:110)
Forteen Stars

Re: Problem in tFileList

two things you need to verify.

1) does the file has read permissions or not

2) is that the file has not corrupted.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Fifteen Stars TRF
Fifteen Stars

Re: Problem in tFileList

Hi,

The following message sounds like you're trying to open an Excel working file.

 

Can't open the specified file: 'C:\Users\dell\Desktop\Data2 - Copie\~$S_1.xlsx

Try to use the "Exclude Filemask" (on Advanced Settings) to exclude filenames starting with "~" (mask "~.*.xlsx") or (maybe better).

Not sure this is enough but you should try.

You may also try to be more restrictive on authorized filemask if possible (yours should look like "*.xlsx" for now).

Let us know.


TRF
Four Stars

Re: Problem in tFileList

i've tried using exclude filemask but same problem still diiden't work and i don't know why

Fifteen Stars TRF
Fifteen Stars

Re: Problem in tFileList

Does the fiel "Data2 - Copie\~$S_1.xlsx" exists in the input folder?

Are you able to open it using Excel? 


TRF
Four Stars

Re: Problem in tFileList

yes i'm able to open it and when i remove tflow iterate and titeratetoflow it works but he reads the first file in the file list only

Fifteen Stars TRF
Fifteen Stars

Re: Problem in tFileList

You should have the following design:

tFileList --(iterate flow)--> tFileInputExcel

Nothing else required to read a file collection.


TRF
Four Stars

Re: Problem in tFileList

i made the same design as you said and i reads only one file

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now