One Star

tmap outputs

Hello !
I'd like to make a job in which I write in an excel file whether a file exists or not.
So after my tFTPFileExist, I have a tMap with 2 outputs each linked to a tFileOutputExcel component with the same file path (one for ((Boolean)globalMap.get("tFTPFileExist_1_EXISTS")) and one for !((Boolean)globalMap.get("tFTPFileExist_1_EXISTS")) )
This is giving me the following error
"Exception in component tFileOutputExcel_2
jxl.read.biff.BiffException: The input file was not found"
And I don't get this error when giving the two tFileOutputExcel different file paths.
Can someone correct my job please ? Smiley Happy

tFTPFileExist----------------------> tFTPFileProperties -----------------> tMap --------------> tFileOutputExcel
component OK main | exists
|
doesn't exist |
v
tFileOutputExcel
2 REPLIES
Community Manager

Re: tmap outputs

Hello
jxl.read.biff.BiffException: The input file was not found"
And I don't get this error when giving the two tFileOutputExcel different file paths.

You are writting in the same excel file, the file will be created if it doesn't exist and the sheet name will be created as the file name without extention.
The default value of sheet name is "Sheet1", so it don't find the sheet name.
Now, you can try to do:
Set the sheet name as file name withou extention. eg:
if the output file don't exist: forum6746.xls,
set the sheet name as: "forum6746"
or create the excel file and set the sheet name before you run the job.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tmap outputs

Thank for your answer shong. I've tried a lot of different settings (sheet name same as filename without extension, file created before running the job, append and not append.... ) and I've never managed to fix the problem. The error is always the same, I don't know what is wrong.
Now I've replaced the tFileOutputExcel components with tFileOutputDelimited and it's working... I guess I'll use this Smiley Happy