Attachment as Excel in a mail -through  HTML

Hi Guys,
I have a requirement on sending an Excel as attachment to a mail.
Basically,the existing program runs for a single record and builds a HTML and sends the information as Mail body in the email.
Now,they want to run a report which will be multiple/records per customer and they need the same information in the EXCEL sheet for a mail?
I'm sure we can build a HTML for all the records and attach is as a .txt format.
But,any idea how complex it is to push it as an EXCEL, with the column names and sizes also to be taken into consideration?
Please advise n help ..
Thanks in advance

Welcome to the forum, please see the FAQ
{thread:id=2174552}
Particularly
{message:id=9360007}
http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/

Similar Messages

  • Can any one tell me how to attach a pdf file to the mail through workflow

    I have a smart which i am able  to convert it to a pdf file...now.. can any one tell me how to attach a pdf file to the mail through workflow

    Hi,
    To create the task for attachment
    Use the BOR SELFITEM and method NOTES_APPEND.
    The out come of this task contain a link called attachment with a clip attached. Clisk on that icon and choose the type of attachment u want . RAW , EXCEL , TXT , PDF... Then using the import icon u can attach the document u like.
    But the TYPE : OBJ.
    Similarly using NOTE_DISPLAY method u can display the documents u like.
    In any work item u have the facility to attach any atttchment for further circulation .
    Attchment @ WORKITEM
    1.Click the workitem for which you want to create the attchment
    2.Press create attachment
    3. Add the attachment u like (PDF)
    Reward points for useful answer.
    Richard A

  • How to attach Excel file in Mail Receiver Adapter?

    Hello Experts,
    In R/3 coding I have Internal Table data available for which i have to generate an Alert mail with Excel file attachment.
    This is the scenario of Proxy sender to Mail Receiver. but I don't know how to convert the Internal Table data into Alert mail excel File attachment.
    Please suggest me.
    Regards,
    Jagesh

    Hi Santhosh,
    Thanks for your suggestion.
    But without using XSLT mapping also, I have generated the Excel File attachment.
    Throgh R/3 coding I am passing following.
    G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From Mail Address.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-TO = TO Mail Address.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-SUBJECT = 'Test Alert mail'.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-DATE = SY-DATUM.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_TYPE =   'text/plain;name="CSV_data.csv"'.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = 'Testing1,Testing2,Testing3'.
          G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_DISPOSITION = 'attachment'.
    And in the Mail Receiver Adapter i have configured as following.
    Use Mail package and Keep Attachment both options are selectd.
    So I am getting the data in different columns in the excel file But How to set the Next ROW in Excel file?
    I thnk i am missing something in CONTENT value.
    Regards
    Jagesh

  • Inline HTML + Inline Text + attachment all 3 in 1 mail  in Outlook

    Hello All,
    I am trying to compose and send a mail using JavaMail library using which I can send a mail with
    1) HTML in the body of the mail
    and
    2) 4 -5 line of text (along with HTML , not as alternative text)
    and
    3) an attachment (which will also be an HTML file )
    Now here are the issues I am facing --
    --> When I try to view above composed mail in Outlook it shows either the text or HTML depending on whichever i add first to the MimeMultipart object using addBodyPart(). I wish to view both in Outlook.
    --> As I am attaching the same HTML file and displaying the same in body is there a way to do both using same file hence keeping the size of mail does not contain the size of HTML file only once , not twice .
    here is the code I am trying to use . Any kind of advice or corrections would be greatly appreciated.
    BufferedReader in = new BufferedReader(new FileReader("filename.html"));
            String tempStr;
            String finalStr="";
            while ((tempStr = in.readLine()) != null)
               finalStr= finalStr + tempStr+"\n" ;
            in.close();
            Multipart mp = new MimeMultipart();
            MimeBodyPart mbp1 =  new MimeBodyPart();
            mbp1.setContent(finalStr, "text/html");
            mbp1.setDisposition(Part.INLINE);
            mp.addBodyPart(mbp1);
            MimeBodyPart mbp2 =  new MimeBodyPart();
            mbp2.setContent("\n\nPlease open attachment if html not viewable in body\n\n","text/plain");
            mbp2.setDisposition(Part.INLINE);
            mp.addBodyPart(mbp2);
            String       attachfilename = "filename.html";
            MimeBodyPart mbp3           = new MimeBodyPart();
            DataSource   fds            = new FileDataSource(attachfilename);
            mbp3.setDataHandler(new DataHandler(fds));
            mbp3.setFileName(attachfilename);
            mbp3.setHeader("Content-Type" , "text/plain");
            mp.addBodyPart(mbp3);
            message.setContent(mp);Thanks

    Hello bshannon
    As you said that "Different mailers will display the same content in different ways." i was wondering if any of the outlook will be able to display more than one mimebodypart(s) if a mail is sent using javamail or is Outlook suposed to show just one body part
    I read this text on wikipedia for Outlook [http://en.wikipedia.org/wiki/Outlook_Express]
    "Handling of PGP/MIME signed messages
    Outlook Express does not correctly handle MIME,[4] and will not display the body of signed messages inline. Users get a blank e-mail and two attachments (one of the message text and one of the signature) and therefore need to open an attachment to see the e-mail. If the email has been forwarded several times, users need to open attached email messages one inside the other multiple times till they reach the parent e-mail message. This bug has still not been rectified."
    So does the above bug applies to the mails sent by JavaMail ?
    Thanks

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • How to attach a excel or word file when replying to a mail ?

    Hi,
    I am having problem while using safari app.
    When i am to reply to a mail and while replying i am to attach an excel or word file, how should i do it ?

    Doesn't matter what mail it is.  You cannot actually do this on an iPhone.  It is a bit frustrating. The only thing you can attach to a mail message (from within the message itself) is a photo or video.
    You can email all sorts of things from within lots of apps, but you cannot add something to a message.

  • How to send Html Mail through navigateToUrl() with contentType "text/html" for Android ?

    Isn't it possible to send Html Mail through navigateToUrl() with contentType "text/html" for Android ? please suggest any workaround
    Thanks

    AHHHH
    What you can do to make HTML for Apple Mail is to make it in an HTML editor, open it with Safari use CMD+i - a new mail message will appear in a moment with the web page in the email body.
    You can't do any major editing in Mail, you'll have to go back to the HTML file. But it works.
    You can also use Copy (from a web page) and then (Edit) Paste as HTML (that what Paste as HTML is for, not for creating HTML email). You can also user Paste as HTML to copy/paste a HTML email you receive or part of a HTML email.

  • In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    Erdygirl please be aware you are posting to a public forum.  I have removed your personal information from your previous post.
    Please check your account at http://www.adobe.com/ to locate your serial number.  You can find more information on how to locate your serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • Send e-mail in HTML-format with attachment

    Does function SO_OBJECT_SEND allow to send e-mail with attachment?
    Does function SO_DOCUMENT_SEND_API1 allow to send e-mail in HTML format?

    Hi SS
    See if you can understand this sample program
    PARAMETERS: po_email TYPE AD_SMTPADR LOWER CASE.
    DATA: li_objcont TYPE STANDARD TABLE OF solisti1,
    li_reclist TYPE STANDARD TABLE OF somlreci1,
    li_objpack TYPE STANDARD TABLE OF sopcklsti1,
    li_objhead TYPE STANDARD TABLE OF solisti1,
    li_content TYPE STANDARD TABLE OF solisti1,
    lwa_objcont TYPE solisti1,
    lwa_reclist TYPE somlreci1,
    lwa_objpack TYPE sopcklsti1,
    lwa_objhead TYPE solisti1,
    lwa_content TYPE solisti1,
    lwa_doc TYPE sodocchgi1,
    l_lines TYPE i.
    REFRESH: li_objcont[], li_reclist[],
    li_objpack[], li_objhead[],
    li_content[].
    CLEAR: lwa_objcont, lwa_reclist,
    lwa_objpack, lwa_objhead,
    lwa_content, lwa_doc.
    MOVE '<body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '<p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE 'This is a sample HTML content from test program' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</p>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    MOVE '</body>' TO lwa_objcont.
    APPEND lwa_objcont TO li_objcont.
    lwa_reclist-receiver = po_email.
    lwa_reclist-rec_type = 'U'.
    APPEND lwa_reclist TO li_reclist.
    lwa_objhead = 'test.htm'.
    APPEND lwa_objhead TO li_objhead.
    lwa_content = 'Please find attached document for more details'.
    APPEND lwa_content TO li_content.
    CLEAR l_lines.
    DESCRIBE TABLE li_content LINES l_lines.
    READ TABLE li_content INTO lwa_content INDEX l_lines.
    lwa_doc-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_content ).
    lwa_doc-obj_langu = 'E'.
    lwa_doc-obj_name = 'Test HTML file'.
    lwa_doc-obj_descr = 'Test HTML file'.
    CLEAR lwa_objpack-transf_bin.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'RAW'.
    APPEND lwa_objpack TO li_objpack.
    CLEAR: lwa_objpack, l_lines.
    DESCRIBE TABLE li_objcont LINES l_lines.
    READ TABLE li_objcont INTO lwa_objcont INDEX l_lines.
    lwa_objpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( lwa_objcont ).
    lwa_objpack-transf_bin = 'X'.
    lwa_objpack-head_start = 1.
    lwa_objpack-head_num = 0.
    lwa_objpack-body_start = 1.
    lwa_objpack-body_num = l_lines.
    lwa_objpack-doc_type = 'HTM' .
    lwa_objpack-obj_name = 'Test HTML file'.
    lwa_objpack-obj_descr = 'Test HTML file'.
    APPEND lwa_objpack TO li_objpack.
    *Sending the mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc
    put_in_outbox = 'X'
    TABLES
    packing_list = li_objpack
    object_header = li_objhead
    contents_bin = li_objcont
    contents_txt = li_content
    receivers = li_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    IF sy-subrc NE 0.
    WRITE:/ 'Document sending failed'.
    ELSE.
    WRITE:/ 'Document successfully sent'.
    COMMIT WORK.
    ENDIF.
    This should give you all you need to know to send an HTML file.
    Thanks buddy

  • Forward excel attachment  to  the  user-defined  mail id

    Hello  Everybody
    i  hv  collect all data into the ITAB and want to transfer that data to  excel format and send that  excel file as an attachment to  the   user-defined  mail id  .
    Input  on selection-screen 
    SELECTION-SCREEN : BEGIN OF BLOCK B1 .
    PARAMETERS  :  MAILID(255)  TYPE C .
    SELECTION-SCREEN : END OF BLOCK B1 .
    plz suggest me 
    ASAP

    Hi Sandeep,
    EMAIL as EXCEL ATTACJEMENTS
    Refer the following codes ..
    Hope this will help you..
    TYPE-POOLS: truxs.
    DATA t5 LIKE t005t OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    SELECT * INTO TABLE t5
    FROM t005t
    WHERE spras = sy-langu.
    DATA wa_data TYPE truxs_t_text_data.
    CALL FUNCTION 'SAP_CONVERT_TO_TXT_FORMAT'
    EXPORTING
    i_line_header = 'X'
    TABLES
    i_tab_sap_data = t5
    CHANGING
    i_tab_converted_data = wa_data
    EXCEPTIONS
    conversion_failed = 1
    OTHERS = 2.
    DATA stmp(4096) TYPE c.
    DATA itmp TYPE i.
    LOOP AT wa_data INTO stmp.
    itmp = STRLEN( stmp ).
    stmp+itmp = cl_abap_char_utilities=>cr_lf.
    MODIFY wa_data FROM stmp.
    ENDLOOP.
    PERFORM send_email.
    *& Form send_email
    FORM send_email .
    DATA docs LIKE docs OCCURS 0 WITH HEADER LINE.
    DATA excelsize TYPE i.
    DATA excel LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA doc LIKE sodocchgi1.
    DATA excelln TYPE i.
    DATA int_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA int_objhead LIKE solisti1 OCCURS 2 WITH HEADER LINE.
    DATA int_objtext LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA int_reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA bodyln LIKE sy-tabix.
    DATA output_data TYPE ssfcrescl.
    excel[] = wa_data[].
    excel table sizes
    DESCRIBE TABLE excel LINES excelln.
    Body Email
    int_objtext-line = 'Test Body'.
    APPEND int_objtext.
    DESCRIBE TABLE int_objtext LINES bodyln.
    READ TABLE int_objtext INDEX bodyln.
    CLEAR doc.
    doc-doc_size = ( bodyln - 1 ) * 255 + STRLEN( int_objtext ).
    doc-obj_name = ' '.
    doc-sensitivty = 'P'.
    doc-proc_syst = sy-sysid.
    doc-proc_clint = sy-mandt.
    CLEAR: int_objpack, int_objpack[].
    int_objpack-transf_bin = ' '.
    int_objpack-head_start = 1.
    int_objpack-head_num = 0.
    int_objpack-body_start = 1.
    int_objpack-body_num = bodyln.
    int_objpack-doc_type = 'RAW'.
    int_objpack-obj_descr = 'Test'.
    APPEND int_objpack.
    CLEAR: int_objhead, int_objhead[].
    int_objhead = 'Attachment'.
    APPEND int_objhead.
    int_objpack-transf_bin = 'X'.
    int_objpack-head_start = 1.
    int_objpack-head_num = 0.
    int_objpack-body_start = 1.
    int_objpack-body_num = excelln.
    int_objpack-doc_size = excelsize.
    int_objpack-doc_type = 'XLS'.
    int_objpack-obj_name = 'excel'.
    int_objpack-obj_descr = 'test.xls'. "File name
    APPEND int_objpack.
    Set Receiver
    int_reclist-receiver = 'SAPUSER'.
    int_reclist-rec_type = 'B'.
    int_reclist-notif_del = 'X'.
    int_reclist-notif_read = 'X'.
    int_reclist-notif_ndel = 'X'.
    int_reclist-express = 'X'.
    APPEND int_reclist.
    doc-obj_descr = 'Report in Excel'.
    Sending Email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = int_objpack
    object_header = int_objhead
    contents_bin = excel
    contents_txt = int_objtext "Body
    receivers = int_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    ENDFORM. " send_email
    Note:
    - If you are using FM SAP_CONVERT_TO_TXT_FORMAT you will not be able to execute this program in the background.
    - dont forget to change 'SAPUSER' to your SAP user ID
    - you can check the email by using tcode 'SBWP'.
    Reward points if this Helps.
    Manish

  • HTML E-mail through workflow.

    Hi all,
    Can any one please tell me how we can send an HTML e-mail through workflow.
    The E-mail should be having a link, so that when the user clicks on that link it must take the user to the specified website, say http://www.google.com.
    My Tools version is 8.48 and the application is 8.8.
    I could send the e-mail with a link through sendmail function in peoplecode. But i want it through Workflow.
    Please help me.
    Thank you,
    Bye.

    This is a repeated question in the forum, refer to "http://forums.oracle.com/forums/thread.jspa?threadID=620087&tstart=0" for solution.
    Jayaprakash Tedla

  • How to read .cvs(excel file) in mail attachment

    Hi,
    I'm using java mail to read the attachment in mail. The attachment are excel file which is in .csv format.
    I'm able to save the attachment to my hard drive which is in .dat format. i tried to use MimeUtility.decodeText() to decode it back to .csv format but it doesn't work.
    Anyone have any suggestion on how to decode it back to the previous format?
    thanks

    POI

  • Purchase Order Smartform as attachment in step mail through workflow

    Whenever user create a PO, mail should trigger in Microsoft Outlook, with the purchase order form as attachment.
    I am able to send mail to Microsoft Outlook whenever PO is created.
    But kindly advice how to attach PO smartform in th mail.
    Regards,
    Rahul.

    Hello,
    Please find below link. There is lot of stuff in google regarding this.
    smartform as work item attachment
    Re: PDF attachment in mail
    Regards.
    Edited by: vikram singh on Jan 30, 2012 2:00 PM

  • Attached PDF file in mail through PL/SQL, unable to open

    Hi All,
    Database : Oracle Database 10g Release 10.2.0.1.0 - Production
    I have database procedure which attach a pdf in mail and send to specified user.
    Its working fine, but my problem here, if inside the PDF file have any logo or images, user unable to open the attachment file.
    It give error "It was sens as an email attachment and was not correctly decoded".
    For Encoding I have used : utl_encode.base64_encode
    If normal PDF file they can open.(I mean without any locg or images).
    Please give me your solution for handle this situation.
    Thanks in advance.

    Sun wrote:
    Thanks for your advice,
    Please let me know, how can i do this. plz..What do you not understand in my suggestion?
    Use your own mail reader. Create an e-mail. Attach the PDF. Send the e-mail to your address.
    In your inbox, the mail will arrive.
    Now select the "+view raw format+" option of your mail reader (most mail readers have this, including MS Outlook).
    Look at the contents of the mail body. This will show you how the attachment was inserted into the mail itself. Look at the Mime types. Look at the mail header. This is a working example of what your code needs to create as an e-mail body in PL/SQL (or any other language).
    This is not rocket science....

  • I can not print my e-mail through Firefox, I can print attachment is ok. Please help

    I can not print e-mail through Firefox, I can print from Google or IE, I tried about:config and reset, I am still having same problem.

    What happens when you try to print: do you get an error message, or a blank/jumbled page, or just nothing?
    If you are using an email site that offers a special print-formatted page, this usually opens in a pop-up window. Is there a problem with the window not opening?

Maybe you are looking for

  • [Solved] Problem with mouse cursor gnome3

    Hi I moved back to Archlinux after a brief stay in LMDE, and test the new GNOME3, I am unpleasantly surprised that after a while the mouse is moving himself toward the top of the screen. I searched the internet, and seems to be a problem with the gno

  • Could not add client to topology, SF480, Solaris10u8

    Hi, I'm not able to add a newly installed client SF480 Solaris 10u8 to topology.... more accurately I'm able to discover/add it:-) but after double clicking the server icon the usual windows opens and after 10-15 sec. it stops responding....nothing h

  • Minor editor bug

    Hi, I noticed couple problems with JDev editor: 1) editor only shows "Brace Mismatch" when cursor is positioned next to it. So when code you think that there is no errors but when you compile errors are reported. 2) some times syntax error are not sh

  • Rosettanet mapping (PIP3A4)

    I'm sending purchase order Idoc from R3 to XI and then to business partner who want's to receive the PO in a rosettanet format. I have imported the rosettanet XI additional content to the integration builder but I don't know how to map between the pu

  • Loading an Applet

    Hi I am making a 2D game using a JApplet and when I run the Applet, sometimes only half of the stuff loads (ie sometimes only the character shows, sometimes just the background, sometimes neither). I was noticing some substantial lag too, and I have