cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

fixed column length in excel using cl_bcs_convert=>string_to_solix

ravikiran558
Discoverer
0 Likes
675

Hello All,

I am using cl_bcs_convert=>string_to_solix to send a internal table as excel attachment in a mail in SAP.

Able to achieve the excel - but the data is not aligned correctly, i mean i want fixed length for all the fields in excel. Also i want to colour heading of the excel fields.

CONCATENATE gv_string <dyn_wa> gc_tab gc_crlf INTO gv_string.

    TRY.
        CALL METHOD cl_bcs_convert=>string_to_solix
          EXPORTING
            iv_string   gv_string
            iv_codepage '4103'   "UTF-16LE preferred by Microsoft Excel
            iv_add_bom  abap_true  "Byte order mark
          IMPORTING
            et_solix    lt_string
            ev_size     lv_size.
      CATCH cx_bcs.
        MESSAGE e445(so).
    ENDTRY.

Thanks in advance

Accepted Solutions (0)

Answers (0)