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.
2 REPLIES
One Star

Re: Sending an email w/ Excel Attachment

Same issue.
Can someone help to solve this issue?
Antonio
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.