Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8338

Excel formating in email attachment without using XML.

$
0
0

Hello Eperts,

 

I have a requirement where in I am sending an excel as an attachment, now the requirement is to format this excel.

Scenario: An email is to be sent with attached excel, the column headings should be in BOLD,  the columns should be emphasized/optimized,

               few of the columns are to be colored and so on...

Please do suggest an approach to ahcieve this, I am using below code...

  

TRY.
      cl_bcs_convert=>string_to_solix(
        EXPORTING
          iv_string   = lv_string
          iv_codepage = '4103'  "suitable for MS Excel, leave empty
          iv_add_bom  = 'X'     "for other doc types
        IMPORTING
          et_solix  = binary_content
          ev_size   = size ).
    CATCH cx_bcs.
      MESSAGE e445(so).
  ENDTRY.

*     add the spread sheet as attachment to document object
  TRY.
      go_email_body->add_attachment(
           i_attachment_type    = 'xls'                     "#EC NOTEXT
           i_attachment_subject = 'Process' "#EC NOTEXT
           i_attachment_size    = size
           i_att_content_hex    = binary_content ).
    CATCH cx_document_bcs.
      MESSAGE e898(so).
  ENDTRY.

 

I have tried to achieve it using FM: SO_NEW_DOCUMENT_ATT_SEND_API1

 

Note: Please don't provide links which are saying XML to excel conversion, there is an issue with this.

 

Warm Regards,

Aabid Khan


Viewing all articles
Browse latest Browse all 8338

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>