One Star

[resolved] using multiple tBufferOutput to write in a single excel file

What i want to do is extract informations from different excel files with tFileList , the files are structured of three sheets each (xlsx files) , i want to combine the different sheets in each file on a single file . here is my job , how can i do this ?
5 REPLIES
One Star

Re: [resolved] using multiple tBufferOutput to write in a single excel file

Hello largouwalid - here's one way to do this... You can tweak it to do achieve your desired solution, but it provides an overall framework... http://www.talendforge.org/forum/viewtopic.php?pid=131115#p131115
One Star

Re: [resolved] using multiple tBufferOutput to write in a single excel file

Thanks for the answer , but in my case i have different structure in each sheet , so i cannot use the tMap component ! I have to use multiple tBuffer at the same time , is it possible ?
One Star

Re: [resolved] using multiple tBufferOutput to write in a single excel file

largouwalid - you can certainly do that in Talend... Question is, what is the distinguishing characteristic between your 3 xlsx files? Seems like you'd want to filter on that characteristic when you get the file from the tFileList before processing it.
To hold and pass data in memory within the same job, use tHashOutput / tHashInput (you may have to add them to your pallette by going to File --> Edit Project Properties --> Designer --> Palette).
Seventeen Stars

Re: [resolved] using multiple tBufferOutput to write in a single excel file

Hello,
the tBufferOutputs writes into one buffer and the tBufferInput reads always from the same buffer and returns the same datasets. Therefore your design could not work. I suggest you use the components tHashOutput and tHashInput. These components can be paired output->input (with different schemas between the various pairs).
Per default this components are not enabled. Please go to the project settings->Palette design and move them to the right side.
There is a bug in your design. You will start writing the new excel file when the first flow has been finished. The second flow (staring with tBufferInput_2) must fail in this scenario.
Please remove the OnComponentOk triggers to tFileExcelWorkbookSave and connect tBufferInput_1 with OnSubjobOk to tBufferInput_2 and from tBufferInput_2 with OnSubjobOk with tFileExcelWorkbookSave.
One Star

Re: [resolved] using multiple tBufferOutput to write in a single excel file

Thanks a lot , i solved my problem this way , by using a tJava and flushing the global buffer , tell me if it's okay ? it's working . but is it best practice .( i guess it resource consuming)