Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] tFileOutputExcel in TOS V3.2.1 r31371

Highlighted
One Star

[resolved] tFileOutputExcel in TOS V3.2.1 r31371

Hi, everyone..
Using TOS v3.2.1, I've encountered an error while using tFileOutputExcel component. Here's the scenario:
1. Read data from databases.
2. Transform it using tMap. The tMap output is more than 1.
3. Load the data into 1 Excel file. The Excel file will have many worksheets depending on the tMap outputs.
When I run the job, TOS give me an error:
Exception in component tFileOutputExcel_2
jxl.read.biff.BiffException: The input file was not found
at jxl.read.biff.File.<init>(File.java:124)
at jxl.Workbook.getWorkbook(Workbook.java:221)
at jxl.Workbook.getWorkbook(Workbook.java:198)
at test_ground.write2excelfile_0_1.write2ExcelFile.tRowGenerator_1Process(write2ExcelFile.java:753)
at test_ground.write2excelfile_0_1.write2ExcelFile.runJobInTOS(write2ExcelFile.java:1417)
at test_ground.write2excelfile_0_1.write2ExcelFile.main(write2ExcelFile.java:1310)
After that, I simulate the same scenario using tRowGenerator as an input and the job still prompt the same error. Attached the related screencaps with this post.
I'm wondering has anybody here ever got the same error? Should I report this issue to the Bug Tracker?

Accepted Solutions
Highlighted
One Star

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

Thanks..
Solved this issue using tSortRow as an input for the tFileOutputExcel. (tMap >> tSortRow >> tFileOutputExcel)
Now it can load data into the same Excel with different worksheets.

View solution in original post


All Replies
Highlighted
One Star

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

U can't do that, because iternally it requires to open the same file twice.
A workaround is to write a buffer and to write to each sheet on subjob at a time.
Highlighted
One Star

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

Thanks..
Solved this issue using tSortRow as an input for the tFileOutputExcel. (tMap >> tSortRow >> tFileOutputExcel)
Now it can load data into the same Excel with different worksheets.

View solution in original post

Highlighted
One Star

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

Thanks Smiley Wink
Highlighted
One Star

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

Hey can u please put the screenshot of ur solution please
Highlighted

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

hi..can you please keep the screen shots here..
Highlighted

Re: [resolved] tFileOutputExcel in TOS V3.2.1 r31371

hi.. here is the solution..
tRowGenerator---->tMap---->tFileOutputExcel_1
|
|
|
tSortRow------>tFileOutputExcel_2
tRowGenerator ------------columns are id,city columns. And " No.of Rows for Row Generator : 100 "
conditions in tMap componet-----------id <=50 for tFileOutputExcel_1
id>50 for tFileOutputExcel_2
Give the same file name for both excel components and sheet names must be different like "SHEET1" for tFileOutputExcel_1, "SHEET2" for tFileOutputExcel_2.
And Set "Append existing file" setting in tFileOutputExcel_2 component.
tSortRow------------ add a column id and select asc or desc.
Thats it.

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog