Sending an email w/ Excel Attachment

One Star

Sending an email w/ Excel Attachment

I have built a job that processes an Excel workbook and generates multiple workbooks from the data.
I would like the job to then email the output workbooks as an attachment using the tSendMail component.
The job will send the email IF I hardcode the path to the attachment in the tSendMail component. However, if I use a context variable for the attachment file path it will not work. It will only send 488 byte file that will not open in Excel (see images).
Does anyone have any ideas?
Thanks, Rick.
One Star

Re: Sending an email w/ Excel Attachment

Same issue.
Can someone help to solve this issue?
One Star

Re: Sending an email w/ Excel Attachment

U have to use a trigger "onSubjob ok" after writing excel files and then send the email.
That's because excel file handlers are not closed yet, using the trigger, the finalization are operated and the files are then available to read.
I don't understand the meaning of your row2 and row4, just put the trigger between your tFileOutputExcel_2 and the tSendMail_1.

Cloud Free Trial

Try Talend Cloud free for 30 days.


Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.