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?
Antonio
Highlighted
One Star

Re: Sending an email w/ Excel Attachment

Hello,
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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now