Mail Report as Excel Attachment

(2 posts) (1 voice)
  1. Stuart Gibson, Member

    Hi

    Im trying to attach a report and mail it as Excel attachment. The code is:

    DROP PROCEDURE IF EXISTS sp_DBR_Outstanding_RECONF_Email
    $$
    CREATE PROCEDURE `sp_DBR_Outstanding_RECONF_Email`()
    BEGIN

    select 'dbr.mail';
    select 'dbr.mail.sender', 'No-Reply@xxx.com', 'TFE Swindon JIT Reports';
    select 'dbr.mail.attach', 'Outstanding_RECONF_Messages.xlsx', 'link-to-report&export=excel';

    select 'recipient-email-address', 'recipient-name', 'Outstanding RECONF Messages',
    concat('Attached is the latest list of Outstanding RECONF messages', char(10),
    '-- ', char(10),
    'TFE Swindon JIT Reports');

    END
    $$

    What am I doing wrong ???

    Thanks,
    Stu

  2. Stuart Gibson, Member

    I replaced the &export=excel with &export=xlxs and seems to work...

    Thanks.
    Stu


Reply

You must log in to post.