Skip to Content
h4. Introduction  This blog is an extension to my previous blog eMail  Reporting (eMail Reporting). This deals with the issue of sending out the XI payload in a  mail attachment of different formats. Here let us see how a payload is converted  to a Excel report or Word report in a mail attachment. h4. Approach   Let us use the same XSLT mapping which was used to generate a report form the  payload. But there is a small change we need to do in the mail pacakge to send  a Excel Report as an attachment. In case of eMail  Reporting (eMail Reporting)  the *Content_Typ*e was set to *text/html*,    but in this case we need to set the *Content_Type* as *application/vnd.ms-excel*.   The following is the same XSLT mapping which was used in eMail  Reporting (eMail Reporting) with just a change in Content_Type   h4. mail.xsl    h4. Source XML   h4. Mail with Excel attachment image   h4. Attached Excel report image      Let us go ahead and do a small change again in the content type to receive    a Word report as attachment. We just need to change the *Contet_Type*    to *application/msword* and the mail will be received with a    word as attachment.       The following are the screenshots of the mail received h4. Mail with Word attachment image   h4. Attached Word report image
To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Michikuni Takeda
    Hi,Prakash

    Thank you for excellent blogs, it’s very useful.
    I have a quetion about sender Mail adapter.
    Is it possible to use sender Mail adapter with Excel attachment, and convert the Excel
    sheet into xml format payload?
    Please answer my question.

    Michikuni 

    (0) 
    1. Hi Michikuni,

      Yes it is possible but using adapter module.
      You can use PayloadSwapBean and then write your custom adapter module to convert the Excel file as payload.

      Thanks,
      Prakash

      (0) 
      1. Michikuni Takeda
        Hi Prakash,

        Thanks for your reply and good information to use PayloadSwapBean.
        And I have other questions, where can I find PayloadSwapBean source code and write custom adapter module?
        Can you answer my questions, Prakash?

        Best regards,
        Michikuni

        (0) 
        1. Hi Michikuni,

          You will get the source code of the PayloadSwapBean. Check out this blog The specified item was not found. to know more about using PayloadSwapBean in a Sender Mail Adapter.

          Regards,
          Prakash

          (0) 
          1. Ooops sorry typo error…

            >>>You will get the source code of the PayloadSwapBean

            You will not get the source code of the PayloadSwapBean

            Regards,
            Prakash

            (0) 
  2. Piyush Srivastava
    Hi Prakash ,

    I wanted to have a mail Excel workbook created with more then one work sheet in it what checnges wil be needed in the XSLT mapping of this Blog??

    Urgent Help needed

    Regards
    Piyush

    (0) 
  3. Indu Khurana
    Hi,

    Scenario:
    idoc – mail (shipment)
    The blog is useful but I need to generate a  dynamic name for the attachment and the value of file name is to be generated from fields of IDoc(src).I have stored the value in one of the fields in Shipment structure.Dynamic config is not working .Please suggest me the code for dynamic config in xslt

    (0) 

Leave a Reply