Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Want to create multiple sheet in tFileOutputExcel

Hi,
I am new in Talend. I am stucked at a point.
I want multiple sheet in a single excel output . The number of sheet depend on contain.
let takes an example
main excel
id | category | description
1 | wiki | asdfkj
2 | youtube | asdfhjg
3 | picasa | asdfjkah
4 | wiki | asdfkj
5 | youtube | asdfhjg
6 | picasa | asdfjkah
now based on category i need the sheet should be created . and one more thing category can be more so cannot fixed on 3 or 4 filters
Labels (2)
15 Replies
Anonymous
Not applicable
Author

Hi
Sorry, I don't understand you very well, what does the result look like?
Best regards
Shong
Anonymous
Not applicable
Author

Let me clear it again
main excel input file
=================
id | category | description
1 | wiki | asdfkj
2 | youtube | asdfhjg
3 | picasa | asdfjkah
4 | wiki | asdfkj
5 | youtube | asdfhjg
6 | picasa | asdfjkah
Required output
===========
Wiki (sheet 1)
id| description
----------------
1 | fasdfasdf
4 | dfgsdfgsdfg
youtube (sheet 2)
id| description
----------------
2 | fasdfasdf
5 | dfgsdfgsdfg
picasa (sheet 3)
id| description
----------------
3 | fasdfasdf
6 | dfgsdfgsdfg
Anonymous
Not applicable
Author

Hi
Ok, I understand what you need now, you need to iterate each row and set a dynamic sheet name. For example:
tFileInputExcel---row1--tFlowToIterate--iterate-->tFileOutputExcel
on tFileOutputExcel, set the 'Sheet name' field as: (String)gloalMap.get("row1.category")
Best regards
Shong
Anonymous
Not applicable
Author

Thanx for your reply , but I cannot connect
tFlowToIterate--iterate-->tFileOutputExcel
Apart from it I have tried to set sheet name using context variable .
In that case the sheet name takes only the initial value of the variable but not the updated values .
Anonymous
Not applicable
Author

Hi
Sorry, it was a wrong job design, the correct job looks like:
tFileInputExcel---row1--tFlowToIterate--iterate-->tFixedFlowInput--main--tFileOutputExcel
on tFixedFlowInput, generate each row of row1, define three columns on schema,
column:value
id:row1.id
category:row1.category
description:row1.description
Best regards
Shong
Anonymous
Not applicable
Author

Hi,
I got some another issue.
It is creating the sheet with dynamic name , but at the end Excel file contain only one sheet and only one record
Anonymous
Not applicable
Author

Hi
How do you set the sheet name in your case? Some screenshots of job will be more helpful for us understanding the problem.
Best regards
Shong
Anonymous
Not applicable
Author

Hi,
I have used
((String)globalMap.get("row1.category"))
With Regards
Anonymous
Not applicable
Author

Hi
Check the option 'Append existing file' and 'Append existing sheet', it should be ok now.
Best regards
Shong