Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chaitanyas
Contributor
Contributor

Create Multiple Tabs with single excel file based on the column

Hi Team,

 

I have requirement that I need to populate multiple sheets in single excel file based on Column.

 

Let me illustrate with an example I have members belongs to separate states and I need create a excel with the State name as tab and its associated members in each tab as a output.

 

Could you please help me in providing the solution, that how do we achieve in Talend. Right now we are using SAP Crystal Report to populate such type of files.

 

Thanks In-advance.

 

Regards,

Chaitanya

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi
You need to iterate each record and append it to the same file. eg:
tFileInputDelimited--main(row1)--tFlowToIterate--iterate--tFixedFlowInput--main--tFileOutputExcel
Assuming there are three columns: id, name and state on the schema of tFileInputDelimited, define the same schema on tFixedFlowInput to generate the current record, set the values like:
for id column: (Integer)globalMap.get("row1.id")
for name column: (String)globalMap.get("row1.name")
for state column: (String)globalMap.get("row1.state")

on tFileOutputExcel, check the 'Append existing file' and 'Append existing sheet' box, define the Sheet Name parameter as:
(String)globalMap.get("row1.state")

Hope it helps you!

Regards
Shong

View solution in original post

20 Replies
Anonymous
Not applicable

Hi
You need to iterate each record and append it to the same file. eg:
tFileInputDelimited--main(row1)--tFlowToIterate--iterate--tFixedFlowInput--main--tFileOutputExcel
Assuming there are three columns: id, name and state on the schema of tFileInputDelimited, define the same schema on tFixedFlowInput to generate the current record, set the values like:
for id column: (Integer)globalMap.get("row1.id")
for name column: (String)globalMap.get("row1.name")
for state column: (String)globalMap.get("row1.state")

on tFileOutputExcel, check the 'Append existing file' and 'Append existing sheet' box, define the Sheet Name parameter as:
(String)globalMap.get("row1.state")

Hope it helps you!

Regards
Shong
bhagyarekha
Creator II
Creator II

Hi All

Thank for posting question and answer.i learned new thing today.i did that one i got it

Anonymous
Not applicable


@bhagyarekha wrote:

Hi All

Thank for posting question and answer.i learned new thing today.i did that one i got it


Glad that it helps you, thanks for your kudo and positive feedback.0683p000009MA9p.png

 

Chaitanyas
Contributor
Contributor
Author

Thank you very much shong! I will try to implement today and post you the questions if I face any issues on implementing your solution.

Thanks much again for your response.

Regards,
Chaitanya
Chaitanyas
Contributor
Contributor
Author

If my source is from TOracle Input, then do I need to follow the same steps. I'm new to use the tfixedFlowInput component. Could you please provide me the few screenshots in implementing the job.

Thanks
Chaitanya
Chaitanyas
Contributor
Contributor
Author

I got the solution and successfully the file is created with the desired output.

 

Really its awesome Shong!

 

I always appreciate your patience in providing the solution to every issue.

 

Thanks once again!!!!!!

 

Thanks,

Chaitanya

Anonymous
Not applicable

Unfortunately I can't find component tFlowToIterate

Do you know where I can find it?

Using Talend v 6.5.0 Build M2

 

Thanks in advance

Mick Arundell

cterenzi
Specialist
Specialist

tFlowToIterate is in the Orchestration folder in the palette.
Anonymous
Not applicable

Thankj you, I've found it now.