Problem in tFileList

Highlighted
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)
Highlighted
Moderator

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 when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Sixteen Stars
Sixteen 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
Highlighted
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

Highlighted
Sixteen Stars
Sixteen 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
Highlighted
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

Highlighted
Sixteen Stars
Sixteen Stars

Re: Problem in tFileList

You should have the following design:

tFileList --(iterate flow)--> tFileInputExcel

Nothing else required to read a file collection.


TRF
Highlighted
Four Stars

Re: Problem in tFileList

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

2019 GARTNER 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

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