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)
Thirteen 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
Forteen Stars TRF
Forteen 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

Forteen Stars TRF
Forteen 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

Forteen Stars TRF
Forteen 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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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