[ABAP] Excel-Version aus der Registry auslesen

DATA(lv_xl_current_version) = ||.

TRY.
    cl_gui_frontend_services=>registry_get_value( EXPORTING
                                                    root      = 0 " HKEY_CLASSES_ROOT
                                                    key       = 'EXCEL.APPLICATION\CURVER'
                                                  IMPORTING
                                                    reg_value = lv_xl_current_version ).

*Excel 97   = 8
*Excel 2000 = 9
*Excel 2002 = 10
*Excel 2003 = 11
*Excel 2007 = 12
*Excel 2010 = 14
*Excel 2013 = 15
*Excel 2016 = 16
    WRITE: / lv_xl_current_version.

  CATCH cx_root INTO DATA(e_txt).
ENDTRY.

Kommentare sind geschlossen.