Skip to Content
avatar image
Former Member

[abap2xlsx] zcl_excel_writer_2007 - > only visible columns

Hi guys. Converting ALV to xlsx is a nice function and works well most of the time. Now we are using ALV variants to select only columns which should be shown to the user and filter only relevant lines. The resulting xlsx is mailed to external contacts.
The filter works fine. Only relevant lines are included in the xlsx file. However the selection on columns does not work well. All columns are taken over.

How can I solve this issue? I thought about retrieving the ALV variant with sort, filter, and fieldcat and create the internal table by abap code. But this is a hell to do.

any ideas?

see also

https://github.com/ivanfemia/abap2xlsx/issues/513

[I am sorry, but tagging abap2xlsx was not possible]

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 12 at 08:42 AM

    well. the debugger is my best friend. issue solved

    SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

    * Handling of hidden columns
    * abap_false. " We make hiden columns visible
    * abap_true. " We convert column and hide it.
    * abap_undefined. " We don't convert hiden columns
    ls_conv_opt-hidenc = abap_undefined.

    CREATE OBJECT lo_converter.
    TRY.
    lo_converter->convert(
    EXPORTING
    is_option = ls_conv_opt
    io_alv = lo_grid

    Add comment
    10|10000 characters needed characters exceeded