One Star

create an excel document with multiple sheets

Hello, i am new to talend and need a help do the following:
I have an input that list all the data from a table, a tmap that generates 2 output. I want to map these 2 outputs in one single excel document but in two different sheets.
could anyone please give some explanations on how to achieve this...
thx
7 REPLIES
Community Manager

Re: create an excel document with multiple sheets

Hello
You can caches the two output to memory first, and then output them into the same excel file one by one, for example:
tFileInputDelimited--tMap---tHashOutput_1
---tHashOutput_2
|
onsubjobok
|
tHashInput_1(read records from tHashOutput_1)---tFileOutputExcel(file1, sheet1)
|
onsubjobok
|
tHashInput_2(read records from tHashOutput_2)---tFileOutputExcel(the same file, sheet2)
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: create an excel document with multiple sheets

Thank you Shong, i will try it and let you know.
Rgds,
Anoushka
One Star

Re: create an excel document with multiple sheets

Since anoushka did not get back to you...
Hong - very helpful.
Here are my observations:
tFileInputDelimited--tMap---tFileOutputExcel_1(file1, sheet1)        >>> Establish file1 with data schema (tMap out will do that).
Make sure "Append existing file" is unchecked.
---tHashOutput_2 >>> store tMap out
.
.
.
---tHashOutput_X >>> store tMap out
|
onsubjobok
|
tHashInput_2(read tHashOutput_2)---tFileOutputExcel_2(file1, sheet2) >>> Create by copying tFileOutputExcel_1,
change sheet name and check "Append existing file".
When connecting tHashInput allow target schema
to update tHashInput.
.
.
.
|
onsubjobok
|
tHashInput_X(read tHashOutput_X)---tFileOutputExcel_X(file1, sheetX) >>> Same as at tFileOutputExcel_2

Honestly, this should be part of the documentation.
How can I help with that?
HTH,
Gábor
One Star

Re: create an excel document with multiple sheets

I am trying to follow this example , but I cannot find HashInput or HashOutput in my version of Open Studio. Can someone help me understand what the problem I am having is? Thanks in advance
My version is:
"Talend Open Studio"
Version: 4.1.0
Build id: r49467-20101005-0735
One Star

Re: create an excel document with multiple sheets

Since I had the same question, I thought I would post the answer I found:
Use menu File>Edit project properties then in the Project Settings window that opens, expand Designer>Palette Settings, shuttle the "Technical" node from the "Hide" side to the "Show" side and click Ok.
From there it should be self-explanatory, given the example provided above.
Version: 4.1.2
Build id: r53616-20110106-0635
Community Manager

Re: create an excel document with multiple sheets

Hi SunDog
Yes, you are right, thanks for giving the answer replace me.Smiley Wink
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: create an excel document with multiple sheets

Gábor - awesome.  Thank you!