diff --git a/docs/abapGit-installation.md b/docs/abapGit-installation.md
index ecf54ab..1573184 100644
--- a/docs/abapGit-installation.md
+++ b/docs/abapGit-installation.md
@@ -4,8 +4,10 @@
## Procedure
-Execute abapGit using the report **ZABAPGIT_FULL**, click on *New Online*, fill the field *Git repository URL* with *https://github.com/abap2xlsx/abap2xlsx.git*, package with *$abap2xls* if you just want to test. If you want to transport abap2xlsx to production then use a non local package. Click *Create package* if the package doesn't exist yet. Then click *Clone online repo*
+Execute abapGit using the report **ZABAPGIT_FULL**, click on *New Online*, fill the field *Git repository URL* with *https://github.com/abap2xlsx/abap2xlsx.git*, package with *$abap2xlsx* if you just want to test. If you want to transport abap2xlsx to production then use a non local package. Click *Create package* if the package doesn't exist yet. Then click *Clone online repo*

To install abap2xlsx click *pull*.
+
+After installing, if you want to install the **demo programs**, repeat the actions above, starting from *New Online* to *pull*, and fill *Git repository URL* with *https://github.com/abap2xlsx/demos*.
diff --git a/src/demos/npl0018 89d0c0ce8687b56786306d6dd.sicf.xml b/src/demos/npl0018 89d0c0ce8687b56786306d6dd.sicf.xml
deleted file mode 100644
index 000f545..0000000
--- a/src/demos/npl0018 89d0c0ce8687b56786306d6dd.sicf.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- /sap/bc/webdynpro/sap/NPL0018/
-
- NPL0018
- NPL0018
- ZDEMO_EXCEL_WDA01
-
-
- NPL0018
- E
- Web Dynpro Application ZDEMO_EXCEL_WDA01 / Component ZDEMO_EXCEL_WDA01
-
-
-
-
diff --git a/src/demos/zabap2xlsx_demo_show.prog.abap b/src/demos/zabap2xlsx_demo_show.prog.abap
deleted file mode 100644
index fcb23a1..0000000
--- a/src/demos/zabap2xlsx_demo_show.prog.abap
+++ /dev/null
@@ -1,280 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZABAP2XLSX_DEMO_SHOW
-*&---------------------------------------------------------------------*
-REPORT zabap2xlsx_demo_show.
-
-
-*----------------------------------------------------------------------*
-* CLASS lcl_perform DEFINITION
-*----------------------------------------------------------------------*
-CLASS lcl_perform DEFINITION CREATE PRIVATE.
- PUBLIC SECTION.
- CLASS-METHODS: setup_objects,
- collect_reports,
-
- handle_nav FOR EVENT double_click OF cl_gui_alv_grid
- IMPORTING e_row.
-
- PRIVATE SECTION.
- TYPES: BEGIN OF ty_reports,
- progname TYPE reposrc-progname,
- sort TYPE reposrc-progname,
- description TYPE repti,
- filename TYPE string,
- END OF ty_reports.
-
- CLASS-DATA:
- lo_grid TYPE REF TO cl_gui_alv_grid,
- lo_text TYPE REF TO cl_gui_textedit,
- cl_document TYPE REF TO i_oi_document_proxy,
-
- t_reports TYPE STANDARD TABLE OF ty_reports WITH NON-UNIQUE DEFAULT KEY.
- CLASS-DATA:error TYPE REF TO i_oi_error,
- t_errors TYPE STANDARD TABLE OF REF TO i_oi_error WITH NON-UNIQUE DEFAULT KEY,
- cl_control TYPE REF TO i_oi_container_control. "Office Dokument
-
-ENDCLASS. "lcl_perform DEFINITION
-
-
-START-OF-SELECTION.
- lcl_perform=>collect_reports( ).
- lcl_perform=>setup_objects( ).
-
-END-OF-SELECTION.
-
- WRITE '.'. " Force output
-
-
-*----------------------------------------------------------------------*
-* CLASS lcl_perform IMPLEMENTATION
-*----------------------------------------------------------------------*
-CLASS lcl_perform IMPLEMENTATION.
- METHOD setup_objects.
- DATA: lo_split TYPE REF TO cl_gui_splitter_container,
- lo_container TYPE REF TO cl_gui_container.
-
- DATA: it_fieldcat TYPE lvc_t_fcat,
- is_layout TYPE lvc_s_layo,
- is_variant TYPE disvariant.
- FIELD-SYMBOLS: LIKE LINE OF it_fieldcat.
-
-
- CREATE OBJECT lo_split
- EXPORTING
- parent = cl_gui_container=>screen0
- rows = 1
- columns = 3
- no_autodef_progid_dynnr = 'X'.
- lo_split->set_column_width( EXPORTING id = 1
- width = 20 ).
- lo_split->set_column_width( EXPORTING id = 2
- width = 40 ).
-
-* Left: List of reports
- lo_container = lo_split->get_container( row = 1
- column = 1 ).
-
- CREATE OBJECT lo_grid
- EXPORTING
- i_parent = lo_container.
- SET HANDLER lcl_perform=>handle_nav FOR lo_grid.
-
- is_variant-report = sy-repid.
- is_variant-handle = '0001'.
-
- is_layout-cwidth_opt = 'X'.
-
- APPEND INITIAL LINE TO it_fieldcat ASSIGNING .
- -fieldname = 'PROGNAME'.
- -tabname = 'REPOSRC'.
-
- APPEND INITIAL LINE TO it_fieldcat ASSIGNING .
- -fieldname = 'SORT'.
- -ref_field = 'PROGNAME'.
- -ref_table = 'REPOSRC'.
- -tech = abap_true. "No need to display this help field
-
- APPEND INITIAL LINE TO it_fieldcat ASSIGNING .
- -fieldname = 'DESCRIPTION'.
- -ref_field = 'REPTI'.
- -ref_table = 'RS38M'.
-
- lo_grid->set_table_for_first_display( EXPORTING
- is_variant = is_variant
- i_save = 'A'
- is_layout = is_layout
- CHANGING
- it_outtab = t_reports
- it_fieldcatalog = it_fieldcat
- EXCEPTIONS
- invalid_parameter_combination = 1
- program_error = 2
- too_many_lines = 3
- OTHERS = 4 ).
-
-* Middle: Text with coding
- lo_container = lo_split->get_container( row = 1
- column = 2 ).
- CREATE OBJECT lo_text
- EXPORTING
- parent = lo_container.
- lo_text->set_readonly_mode( cl_gui_textedit=>true ).
- lo_text->set_font_fixed( ).
-
-
-
-* right: DemoOutput
- lo_container = lo_split->get_container( row = 1
- column = 3 ).
-
- c_oi_container_control_creator=>get_container_control( IMPORTING control = cl_control
- error = error ).
- APPEND error TO t_errors.
-
- cl_control->init_control( EXPORTING inplace_enabled = 'X'
- no_flush = 'X'
- r3_application_name = 'Demo Document Container'
- parent = lo_container
- IMPORTING error = error
- EXCEPTIONS OTHERS = 2 ).
- APPEND error TO t_errors.
-
- cl_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' " EXCEL
- no_flush = ' '
- IMPORTING document_proxy = cl_document
- error = error ).
- APPEND error TO t_errors.
-* Errorhandling should be inserted here
-
-
- ENDMETHOD. "setup_objects
-
- "collect_reports
- METHOD collect_reports.
- FIELD-SYMBOLS LIKE LINE OF t_reports.
- DATA t_source TYPE STANDARD TABLE OF text255 WITH NON-UNIQUE DEFAULT KEY.
- DATA texts TYPE STANDARD TABLE OF textpool.
- DATA description TYPE textpool.
-
-* Get all demoreports
- SELECT progname
- INTO CORRESPONDING FIELDS OF TABLE t_reports
- FROM reposrc
- WHERE progname LIKE 'ZDEMO_EXCEL%'
- AND progname <> sy-repid
- AND subc = '1'.
-
- LOOP AT t_reports ASSIGNING .
-
-* Check if already switched to new outputoptions
- READ REPORT -progname INTO t_source.
- IF sy-subrc = 0.
- FIND 'INCLUDE zdemo_excel_outputopt_incl.' IN TABLE t_source IGNORING CASE.
- ENDIF.
- IF sy-subrc <> 0.
- DELETE t_reports.
- CONTINUE.
- ENDIF.
-
-
-* Build half-numeric sort
- -sort = -progname.
- REPLACE REGEX '(ZDEMO_EXCEL)(\d\d)\s*$' IN -sort WITH '$1\0$2'. " REPLACE REGEX '(ZDEMO_EXCEL)([^][^])*$' IN -sort WITH '$1$2'.REPLACE REGEX '(ZDEMO_EXCEL)([^][^])*$' IN -sort WITH '$1$2'.REPLACE
-
- REPLACE REGEX '(ZDEMO_EXCEL)(\d)\s*$' IN -sort WITH '$1\0\0$2'.
-
-* get report text
- READ TEXTPOOL -progname INTO texts LANGUAGE sy-langu.
- READ TABLE texts INTO description WITH KEY id = 'R'.
- IF sy-subrc > 0.
- "If not available in logon language, use english
- READ TEXTPOOL -progname INTO texts LANGUAGE 'E'.
- READ TABLE texts INTO description WITH KEY id = 'R'.
- ENDIF.
- "set report title
- -description = description-entry.
-
- ENDLOOP.
-
- SORT t_reports BY sort progname.
-
- ENDMETHOD. "collect_reports
-
- METHOD handle_nav.
- CONSTANTS: filename TYPE text80 VALUE 'ZABAP2XLSX_DEMO_SHOW.xlsx'.
- DATA: wa_report LIKE LINE OF t_reports,
- t_source TYPE STANDARD TABLE OF text255,
- t_rawdata TYPE solix_tab,
- wa_rawdata LIKE LINE OF t_rawdata,
- bytecount TYPE i,
- length TYPE i,
- add_selopt TYPE flag.
-
-
- READ TABLE t_reports INTO wa_report INDEX e_row-index.
- CHECK sy-subrc = 0.
-
-* Set new text into middle frame
- READ REPORT wa_report-progname INTO t_source.
- lo_text->set_text_as_r3table( EXPORTING table = t_source ).
-
-
-* Unload old xls-file
- cl_document->close_document( ).
-
-* Get the demo
-* If additional parameters found on selection screen, start via selection screen , otherwise start w/o
- CLEAR add_selopt.
- FIND 'PARAMETERS' IN TABLE t_source.
- IF sy-subrc = 0.
- add_selopt = 'X'.
- ELSE.
- FIND 'SELECT-OPTIONS' IN TABLE t_source.
- IF sy-subrc = 0.
- add_selopt = 'X'.
- ENDIF.
- ENDIF.
- IF add_selopt IS INITIAL.
- SUBMIT (wa_report-progname) AND RETURN "#EC CI_SUBMIT
- WITH p_backfn = filename
- WITH rb_back = 'X'
- WITH rb_down = ' '
- WITH rb_send = ' '
- WITH rb_show = ' '.
- ELSE.
- SUBMIT (wa_report-progname) VIA SELECTION-SCREEN AND RETURN "#EC CI_SUBMIT
- WITH p_backfn = filename
- WITH rb_back = 'X'
- WITH rb_down = ' '
- WITH rb_send = ' '
- WITH rb_show = ' '.
- ENDIF.
-
- OPEN DATASET filename FOR INPUT IN BINARY MODE.
- IF sy-subrc = 0.
- DO.
- CLEAR wa_rawdata.
- READ DATASET filename INTO wa_rawdata LENGTH length.
- IF sy-subrc <> 0.
- APPEND wa_rawdata TO t_rawdata.
- ADD length TO bytecount.
- EXIT.
- ENDIF.
- APPEND wa_rawdata TO t_rawdata.
- ADD length TO bytecount.
- ENDDO.
- CLOSE DATASET filename.
- ENDIF.
-
- cl_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' " EXCEL
- no_flush = ' '
- IMPORTING document_proxy = cl_document
- error = error ).
-
- cl_document->open_document_from_table( EXPORTING document_size = bytecount
- document_table = t_rawdata
- open_inplace = 'X' ).
-
- ENDMETHOD. "handle_nav
-
-ENDCLASS. "lcl_perform IMPLEMENTATION
diff --git a/src/demos/zabap2xlsx_demo_show.prog.xml b/src/demos/zabap2xlsx_demo_show.prog.xml
deleted file mode 100644
index 63222e7..0000000
--- a/src/demos/zabap2xlsx_demo_show.prog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- ZABAP2XLSX_DEMO_SHOW
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo Show
- 19
-
-
-
-
-
diff --git a/src/demos/zangry_birds.prog.abap b/src/demos/zangry_birds.prog.abap
deleted file mode 100644
index 3ad0d17..0000000
--- a/src/demos/zangry_birds.prog.abap
+++ /dev/null
@@ -1,752 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZANGRY_BIRDS
-*& Just for fun
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zangry_birds.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_excel_writer TYPE REF TO zif_excel_writer,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_border_light TYPE REF TO zcl_excel_style_border,
- lo_style_color0 TYPE REF TO zcl_excel_style,
- lo_style_color1 TYPE REF TO zcl_excel_style,
- lo_style_color2 TYPE REF TO zcl_excel_style,
- lo_style_color3 TYPE REF TO zcl_excel_style,
- lo_style_color4 TYPE REF TO zcl_excel_style,
- lo_style_color5 TYPE REF TO zcl_excel_style,
- lo_style_color6 TYPE REF TO zcl_excel_style,
- lo_style_color7 TYPE REF TO zcl_excel_style,
- lo_style_credit TYPE REF TO zcl_excel_style,
- lo_style_link TYPE REF TO zcl_excel_style,
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink.
-
-DATA: lv_style_color0_guid TYPE zexcel_cell_style,
- lv_style_color1_guid TYPE zexcel_cell_style,
- lv_style_color2_guid TYPE zexcel_cell_style,
- lv_style_color3_guid TYPE zexcel_cell_style,
- lv_style_color4_guid TYPE zexcel_cell_style,
- lv_style_color5_guid TYPE zexcel_cell_style,
- lv_style_color6_guid TYPE zexcel_cell_style,
- lv_style_color7_guid TYPE zexcel_cell_style,
- lv_style_credit_guid TYPE zexcel_cell_style,
- lv_style_link_guid TYPE zexcel_cell_style.
-
-DATA: lv_col_str TYPE zexcel_cell_column_alpha,
- lv_row TYPE i,
- lv_col TYPE i,
- lt_mapper TYPE TABLE OF zexcel_cell_style,
- ls_mapper TYPE zexcel_cell_style.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS: lv_default_file_name TYPE string VALUE 'angry_birds.xlsx'.
-
-PARAMETERS: p_path TYPE zexcel_export_dir.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
- lv_workdir = p_path.
- cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
- CHANGING selected_folder = lv_workdir ).
- p_path = lv_workdir.
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
-
-START-OF-SELECTION.
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
- CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- CREATE OBJECT lo_border_light.
- lo_border_light->border_color-rgb = zcl_excel_style_color=>c_white.
- lo_border_light->border_style = zcl_excel_style_border=>c_border_thin.
-
- " Create color white
- lo_style_color0 = lo_excel->add_new_style( ).
- lo_style_color0->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color0->fill->fgcolor-rgb = 'FFFFFFFF'.
- lo_style_color0->borders->allborders = lo_border_light.
- lv_style_color0_guid = lo_style_color0->get_guid( ).
-
- " Create color black
- lo_style_color1 = lo_excel->add_new_style( ).
- lo_style_color1->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color1->fill->fgcolor-rgb = 'FF252525'.
- lo_style_color1->borders->allborders = lo_border_light.
- lv_style_color1_guid = lo_style_color1->get_guid( ).
-
- " Create color dark green
- lo_style_color2 = lo_excel->add_new_style( ).
- lo_style_color2->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color2->fill->fgcolor-rgb = 'FF75913A'.
- lo_style_color2->borders->allborders = lo_border_light.
- lv_style_color2_guid = lo_style_color2->get_guid( ).
-
- " Create color light green
- lo_style_color3 = lo_excel->add_new_style( ).
- lo_style_color3->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color3->fill->fgcolor-rgb = 'FF9DFB73'.
- lo_style_color3->borders->allborders = lo_border_light.
- lv_style_color3_guid = lo_style_color3->get_guid( ).
-
- " Create color green
- lo_style_color4 = lo_excel->add_new_style( ).
- lo_style_color4->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color4->fill->fgcolor-rgb = 'FF92CF56'.
- lo_style_color4->borders->allborders = lo_border_light.
- lv_style_color4_guid = lo_style_color4->get_guid( ).
-
- " Create color 2dark green
- lo_style_color5 = lo_excel->add_new_style( ).
- lo_style_color5->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color5->fill->fgcolor-rgb = 'FF506228'.
- lo_style_color5->borders->allborders = lo_border_light.
- lv_style_color5_guid = lo_style_color5->get_guid( ).
-
- " Create color yellow
- lo_style_color6 = lo_excel->add_new_style( ).
- lo_style_color6->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color6->fill->fgcolor-rgb = 'FFC3E224'.
- lo_style_color6->borders->allborders = lo_border_light.
- lv_style_color6_guid = lo_style_color6->get_guid( ).
-
- " Create color yellow
- lo_style_color7 = lo_excel->add_new_style( ).
- lo_style_color7->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_color7->fill->fgcolor-rgb = 'FFB3C14F'.
- lo_style_color7->borders->allborders = lo_border_light.
- lv_style_color7_guid = lo_style_color7->get_guid( ).
-
- " Credits
- lo_style_credit = lo_excel->add_new_style( ).
- lo_style_credit->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_credit->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lo_style_credit->font->size = 20.
- lv_style_credit_guid = lo_style_credit->get_guid( ).
-
- " Link
- lo_style_link = lo_excel->add_new_style( ).
- lo_style_link->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_link->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lv_style_link_guid = lo_style_link->get_guid( ).
-
- " Create image map " line 2
- DO 30 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 3
- DO 28 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 4
- DO 27 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 5
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 15 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 6
- DO 7 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 13 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 7
- DO 6 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 11 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 8
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 9
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 10
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 11
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 7 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 12
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 13
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 14
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 12 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 15
- DO 6 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 16
- DO 7 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 7 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 17
- DO 8 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 13 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 18
- DO 6 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 23 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 19
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 27 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 20
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 23 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 21
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 19 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 22
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 17 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 23
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 17 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 24
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 10 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 25
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 26
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color6_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 27
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color6_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 28
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color6_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 29
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 30
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 31
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color4_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 32
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color5_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 33
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 34
- DO 3 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 10 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 35
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 11 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 36
- DO 4 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 10 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 11 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 37
- DO 5 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 10 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color7_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 11 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 38
- DO 6 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 10 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 11 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 39
- DO 7 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 22 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 1 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 40
- DO 7 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 17 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 41
- DO 8 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 3 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 15 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 42
- DO 9 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 9 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 2 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 43
- DO 11 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 5 TIMES. APPEND lv_style_color3_guid TO lt_mapper. ENDDO.
- DO 7 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 44
- DO 13 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 6 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- DO 4 TIMES. APPEND lv_style_color2_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 45
- DO 16 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 13 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
- " line 46
- DO 18 TIMES. APPEND lv_style_color0_guid TO lt_mapper. ENDDO.
- DO 8 TIMES. APPEND lv_style_color1_guid TO lt_mapper. ENDDO.
- APPEND INITIAL LINE TO lt_mapper. " escape
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Angry Birds' ).
-
- lv_row = 1.
- lv_col = 1.
-
- LOOP AT lt_mapper INTO ls_mapper.
- lv_col_str = zcl_excel_common=>convert_column2alpha( lv_col ).
- IF ls_mapper IS INITIAL.
- lo_row = lo_worksheet->get_row( ip_row = lv_row ).
- lo_row->set_row_height( ip_row_height = 8 ).
- lv_col = 1.
- lv_row = lv_row + 1.
- CONTINUE.
- ENDIF.
- lo_worksheet->set_cell( ip_column = lv_col_str
- ip_row = lv_row
- ip_value = space
- ip_style = ls_mapper ).
- lv_col = lv_col + 1.
-
- lo_column = lo_worksheet->get_column( ip_column = lv_col_str ).
- lo_column->set_width( ip_width = 2 ).
- ENDLOOP.
-
- lo_worksheet->set_show_gridlines( i_show_gridlines = abap_false ).
-
- lo_worksheet->set_cell( ip_column = 'AP'
- ip_row = 15
- ip_value = 'Created with abap2xlsx'
- ip_style = lv_style_credit_guid ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://abap2xlsx.github.io/abap2xlsx' ).
- lo_worksheet->set_cell( ip_column = 'AP'
- ip_row = 24
- ip_value = 'https://abap2xlsx.github.io/abap2xlsx'
- ip_style = lv_style_link_guid
- ip_hyperlink = lo_hyperlink ).
-
- lo_column = lo_worksheet->get_column( ip_column = 'AP' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_worksheet->set_merge( ip_row = 15 ip_column_start = 'AP' ip_row_to = 22 ip_column_end = 'AR' ).
- lo_worksheet->set_merge( ip_row = 24 ip_column_start = 'AP' ip_row_to = 26 ip_column_end = 'AR' ).
-
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
- lv_file = lo_excel_writer->write_file( lo_excel ).
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = lv_full_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
diff --git a/src/demos/zangry_birds.prog.xml b/src/demos/zangry_birds.prog.xml
deleted file mode 100644
index c2860eb..0000000
--- a/src/demos/zangry_birds.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZANGRY_BIRDS
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Styles
- 25
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_calendar.prog.abap b/src/demos/zdemo_calendar.prog.abap
deleted file mode 100644
index 53df60e..0000000
--- a/src/demos/zdemo_calendar.prog.abap
+++ /dev/null
@@ -1,380 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_CALENDAR
-*& abap2xlsx Demo: Create Calendar with Pictures
-*&---------------------------------------------------------------------*
-*& This report creates a monthly calendar in the specified date range.
-*& Each month is put on a seperate worksheet. The pictures for each
-*& month can be specified in a tab delimited UTF-8 encoded file called
-*& "Calendar.txt" which is saved in the Export Directory.
-*& By default this is the SAP Workdir. The file contains 3 fields:
-*&
-*& Month (with leading 0)
-*& Image Filename
-*& Image Description
-*& URL for the Description
-*& Photographer
-*&
-*& The Images should be landscape JPEG's with a 3:2 ratio and min.
-*& 450 pixel height. They must also be saved in the Export Directory.
-*& In my tests I've discovered a limit of 20 MB in the
-*& cl_gui_frontend_services=>gui_download method. So keep your images
-*& smaller or change to a server export using OPEN DATASET.
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_calendar.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE 'Calendar.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-INCLUDE zdemo_calendar_classes.
-
-DATA: lv_workdir TYPE string.
-
-PARAMETERS: p_from TYPE dfrom,
- p_to TYPE dto.
-
-SELECTION-SCREEN BEGIN OF BLOCK orientation WITH FRAME TITLE orient.
-PARAMETERS: p_portr TYPE flag RADIOBUTTON GROUP orie,
- p_lands TYPE flag RADIOBUTTON GROUP orie DEFAULT 'X'.
-SELECTION-SCREEN END OF BLOCK orientation.
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
- orient = 'Orientation'(000).
- p_from = |{ sy-datum(4) }0101|.
- p_to = |{ sy-datum(4) }1231|.
-
-START-OF-SELECTION.
-
- DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
- lo_drawing TYPE REF TO zcl_excel_drawing.
-
- DATA: lo_style_month TYPE REF TO zcl_excel_style,
- lv_style_month_guid TYPE zexcel_cell_style.
- DATA: lo_style_border TYPE REF TO zcl_excel_style,
- lo_border_dark TYPE REF TO zcl_excel_style_border,
- lv_style_border_guid TYPE zexcel_cell_style.
- DATA: lo_style_center TYPE REF TO zcl_excel_style,
- lv_style_center_guid TYPE zexcel_cell_style.
- DATA: lo_style_right TYPE REF TO zcl_excel_style,
- lv_style_right_guid TYPE zexcel_cell_style.
-
- DATA: lv_full_path TYPE string,
- image_descr_path TYPE string,
- lv_file_separator TYPE c.
- DATA: lv_content TYPE xstring,
- width TYPE i,
- lv_height TYPE i,
- lv_from_row TYPE zexcel_cell_row.
-
- DATA: month TYPE i,
- month_nr TYPE fcmnr,
- count TYPE i VALUE 1,
- title TYPE zexcel_sheet_title,
- value TYPE string,
- image_path TYPE string,
- date_from TYPE datum,
- date_to TYPE datum,
- row TYPE zexcel_cell_row,
- to_row TYPE zexcel_cell_row,
- to_col TYPE zexcel_cell_column_alpha,
- to_col_end TYPE zexcel_cell_column_alpha,
- to_col_int TYPE i.
-
- DATA: month_names TYPE TABLE OF t247.
- FIELD-SYMBOLS: LIKE LINE OF month_names.
-
- TYPES: BEGIN OF tt_datatab,
- month_nr TYPE fcmnr,
- filename TYPE string,
- descr TYPE string,
- url TYPE string,
- photographer TYPE string,
- END OF tt_datatab.
-
- DATA: image_descriptions TYPE TABLE OF tt_datatab.
- FIELD-SYMBOLS: LIKE LINE OF image_descriptions.
-
- CONSTANTS: lv_default_file_name TYPE string VALUE 'Calendar', "#EC NOTEXT
- c_from_row_portrait TYPE zexcel_cell_row VALUE 28,
- c_from_row_landscape TYPE zexcel_cell_row VALUE 38,
- from_col TYPE zexcel_cell_column_alpha VALUE 'C',
- c_height_portrait TYPE i VALUE 450, " Image Height in Portrait Mode
- c_height_landscape TYPE i VALUE 670, " Image Height in Landscape Mode
- c_factor TYPE f VALUE '1.5'. " Image Ratio, default 3:2
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
- CONCATENATE p_path lv_file_separator lv_default_file_name '.xlsx' INTO lv_full_path. "#EC NOTEXT
-
- " Read Image Names for Month and Description
- CONCATENATE p_path lv_file_separator lv_default_file_name '.txt' INTO image_descr_path. "#EC NOTEXT
- cl_gui_frontend_services=>gui_upload(
- EXPORTING
- filename = image_descr_path " Name of file
- filetype = 'ASC' " File Type (ASCII, Binary)
- has_field_separator = 'X'
- read_by_line = 'X' " File Written Line-By-Line to the Internal Table
- codepage = '4110'
- CHANGING
- data_tab = image_descriptions " Transfer table for file contents
- EXCEPTIONS
- file_open_error = 1
- file_read_error = 2
- no_batch = 3
- gui_refuse_filetransfer = 4
- invalid_type = 5
- no_authority = 6
- unknown_error = 7
- bad_data_format = 8
- header_not_allowed = 9
- separator_not_allowed = 10
- header_too_long = 11
- unknown_dp_error = 12
- access_denied = 13
- dp_out_of_memory = 14
- disk_full = 15
- dp_timeout = 16
- not_supported_by_gui = 17
- error_no_gui = 18
- OTHERS = 19
- ).
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Create Styles
- " Create an underline double style
- lo_style_month = lo_excel->add_new_style( ).
- lo_style_month->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_right.
- lo_style_month->font->bold = abap_true.
- lo_style_month->font->size = 36.
- lv_style_month_guid = lo_style_month->get_guid( ).
- " Create border object
- CREATE OBJECT lo_border_dark.
- lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
- lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
- "Create style with border
- lo_style_border = lo_excel->add_new_style( ).
- lo_style_border->borders->allborders = lo_border_dark.
- lo_style_border->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_right.
- lo_style_border->alignment->vertical = zcl_excel_style_alignment=>c_vertical_top.
- lv_style_border_guid = lo_style_border->get_guid( ).
- "Create style alignment center
- lo_style_center = lo_excel->add_new_style( ).
- lo_style_center->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_center->alignment->vertical = zcl_excel_style_alignment=>c_vertical_top.
- lv_style_center_guid = lo_style_center->get_guid( ).
- "Create style alignment right
- lo_style_right = lo_excel->add_new_style( ).
- lo_style_right->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_right.
- lv_style_right_guid = lo_style_right->get_guid( ).
-
- " Get Month Names
- CALL FUNCTION 'MONTH_NAMES_GET'
- TABLES
- month_names = month_names.
-
- zcl_date_calculation=>months_between_two_dates(
- EXPORTING
- i_date_from = p_from
- i_date_to = p_to
- i_incl_to = abap_true
- IMPORTING
- e_month = month
- ).
-
- date_from = p_from.
-
- WHILE count <= month.
- IF count = 1.
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- ELSE.
- lo_worksheet = lo_excel->add_new_worksheet( ).
- ENDIF.
-
- lo_worksheet->zif_excel_sheet_properties~selected = zif_excel_sheet_properties=>c_selected.
-
- title = count.
- value = count.
- CONDENSE title.
- CONDENSE value.
- lo_worksheet->set_title( title ).
- lo_worksheet->set_print_gridlines( abap_false ).
- lo_worksheet->sheet_setup->paper_size = zcl_excel_sheet_setup=>c_papersize_a4.
- lo_worksheet->sheet_setup->horizontal_centered = abap_true.
- lo_worksheet->sheet_setup->vertical_centered = abap_true.
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_width( '1.0' ).
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_width( '2.0' ).
- IF p_lands = abap_true.
- lo_worksheet->sheet_setup->orientation = zcl_excel_sheet_setup=>c_orientation_landscape.
- lv_height = c_height_landscape.
- lv_from_row = c_from_row_landscape.
- lo_worksheet->sheet_setup->margin_top = '0.10'.
- lo_worksheet->sheet_setup->margin_left = '0.10'.
- lo_worksheet->sheet_setup->margin_right = '0.10'.
- lo_worksheet->sheet_setup->margin_bottom = '0.10'.
- ELSE.
- lo_column = lo_worksheet->get_column( 'K' ).
- lo_column->set_width( '3.0' ).
- lo_worksheet->sheet_setup->margin_top = '0.80'.
- lo_worksheet->sheet_setup->margin_left = '0.55'.
- lo_worksheet->sheet_setup->margin_right = '0.05'.
- lo_worksheet->sheet_setup->margin_bottom = '0.30'.
- lv_height = c_height_portrait.
- lv_from_row = c_from_row_portrait.
- ENDIF.
-
- " Add Month Name
- month_nr = date_from+4(2).
- IF p_portr = abap_true.
- READ TABLE month_names WITH KEY mnr = month_nr ASSIGNING .
- CONCATENATE -ltx ` ` date_from(4) INTO value.
- row = lv_from_row - 2.
- to_col = from_col.
- ELSE.
- row = lv_from_row - 1.
- to_col_int = zcl_excel_common=>convert_column2int( from_col ) + 32.
- to_col = zcl_excel_common=>convert_column2alpha( to_col_int ).
- to_col_int = to_col_int + 1.
- to_col_end = zcl_excel_common=>convert_column2alpha( to_col_int ).
- CONCATENATE month_nr '/' date_from+2(2) INTO value.
- to_row = row + 2.
- lo_worksheet->set_merge(
- EXPORTING
- ip_column_start = to_col " Cell Column Start
- ip_column_end = to_col_end " Cell Column End
- ip_row = row " Cell Row
- ip_row_to = to_row " Cell Row
- ).
- ENDIF.
- lo_worksheet->set_cell(
- EXPORTING
- ip_column = to_col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = lv_style_month_guid
- ).
-
- " Add drawing from a XSTRING read from a file
- UNASSIGN .
- READ TABLE image_descriptions WITH KEY month_nr = month_nr ASSIGNING .
- IF IS ASSIGNED.
- value = -descr.
- IF p_portr = abap_true.
- row = lv_from_row - 3.
- ELSE.
- row = lv_from_row - 2.
- ENDIF.
- IF NOT -url IS INITIAL.
- lo_hyperlink = zcl_excel_hyperlink=>create_external_link( -url ).
- lo_worksheet->set_cell(
- EXPORTING
- ip_column = from_col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_hyperlink = lo_hyperlink
- ).
- ELSE.
- lo_worksheet->set_cell(
- EXPORTING
- ip_column = from_col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ).
- ENDIF.
- lo_row = lo_worksheet->get_row( row ).
- lo_row->set_row_height( '22.0' ).
- " Photographer
- IF NOT -photographer IS INITIAL.
- value = -photographer.
- lo_worksheet->set_cell(
- EXPORTING
- ip_column = to_col_end " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = lv_style_right_guid
- ).
- ENDIF.
- " In Landscape mode the row between the description and the
- " dates should be not so high
- IF p_lands = abap_true.
- row = lv_from_row - 3.
- lo_worksheet->set_cell(
- EXPORTING
- ip_column = from_col " Cell Column
- ip_row = row " Cell Row
- ip_value = ' ' " Cell Value
- ).
- lo_row = lo_worksheet->get_row( row ).
- lo_row->set_row_height( '7.0' ).
- row = lv_from_row - 1.
- lo_row = lo_worksheet->get_row( row ).
- lo_row->set_row_height( '5.0' ).
- ENDIF.
-
- CONCATENATE p_path lv_file_separator -filename INTO image_path.
- lo_drawing = lo_excel->add_new_drawing( ).
- lo_drawing->set_position( ip_from_row = 1
- ip_from_col = 'B' ).
-
- lv_content = zcl_helper=>load_image( image_path ).
- width = lv_height * c_factor.
- lo_drawing->set_media( ip_media = lv_content
- ip_media_type = zcl_excel_drawing=>c_media_type_jpg
- ip_width = width
- ip_height = lv_height ).
- lo_worksheet->add_drawing( lo_drawing ).
- ENDIF.
-
- " Add Calendar
- date_to = date_from.
- date_to+6(2) = '01'. " First of month
- ADD 31 TO date_to. " Somewhere in following month
- date_to = date_to - date_to+6(2). " Last of month
- IF p_portr = abap_true.
- zcl_helper=>add_calendar(
- EXPORTING
- i_date_from = date_from
- i_date_to = date_to
- i_from_row = lv_from_row
- i_from_col = from_col
- i_day_style = lv_style_border_guid
- i_cw_style = lv_style_center_guid
- CHANGING
- c_worksheet = lo_worksheet
- ).
- ELSE.
- zcl_helper=>add_calendar_landscape(
- EXPORTING
- i_date_from = date_from
- i_date_to = date_to
- i_from_row = lv_from_row
- i_from_col = from_col
- i_day_style = lv_style_border_guid
- i_cw_style = lv_style_center_guid
- CHANGING
- c_worksheet = lo_worksheet
- ).
- ENDIF.
- count = count + 1.
- date_from = date_to + 1.
- ENDWHILE.
-
- lo_excel->set_active_sheet_index_by_name( '1' ).
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_calendar.prog.xml b/src/demos/zdemo_calendar.prog.xml
deleted file mode 100644
index b025e2e..0000000
--- a/src/demos/zdemo_calendar.prog.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
- ZDEMO_CALENDAR
- 1
- T
- E
- X
- X
-
-
- -
- I
- 000
- Orientation
- 21
-
- -
- I
- 001
- CW
- 12
-
- -
- I
- 002
- Created with https://github.com/abap2xlsx/abap2xlsx
- 132
-
- -
- R
- abap2xlsx Demo: Create Calendar with Pictures
- 45
-
- -
- S
- P_FROM
- From
- 12
-
- -
- S
- P_LANDS
- Landscape
- 17
-
- -
- S
- P_PATH
- Path
- 12
-
- -
- S
- P_PORTR
- Portrait
- 16
-
- -
- S
- P_TO
- To
- 10
-
-
-
- -
- D
-
-
-
- I
- 000
- Ausrichtung
- 21
-
- -
- I
- 001
- KW
- 12
-
- -
- I
- 002
- Erzeugt mit https://github.com/abap2xlsx/abap2xlsx
- 132
-
- -
- R
- abap2xlsx Demo: Erzeugen eines Kalenders mit Bildern
- 70
-
- -
- S
- P_FROM
- Von
- 38
-
- -
- S
- P_LANDS
- Querformat
- 38
-
- -
- S
- P_PATH
- Pfad
- 38
-
- -
- S
- P_PORTR
- Hochformat
- 38
-
- -
- S
- P_TO
- Bis
- 38
-
-
-
-
-
-
-
diff --git a/src/demos/zdemo_calendar_classes.prog.abap b/src/demos/zdemo_calendar_classes.prog.abap
deleted file mode 100644
index 106f9a6..0000000
--- a/src/demos/zdemo_calendar_classes.prog.abap
+++ /dev/null
@@ -1,476 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Include ZDEMO_CALENDAR_CLASSES
-*&---------------------------------------------------------------------*
-
-*&---------------------------------------------------------------------*
-*& Class ZCL_DATE_CALCULATION
-*&---------------------------------------------------------------------*
-* Text
-*----------------------------------------------------------------------*
-CLASS zcl_date_calculation DEFINITION.
- PUBLIC SECTION.
- CLASS-METHODS: months_between_two_dates
- IMPORTING
- i_date_from TYPE datum
- i_date_to TYPE datum
- i_incl_to TYPE flag
- EXPORTING
- e_month TYPE i.
-ENDCLASS. "ZCL_DATE_CALCULATION
-
-
-*----------------------------------------------------------------------*
-* CLASS ZCL_DATE_CALCULATION IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS zcl_date_calculation IMPLEMENTATION.
- METHOD months_between_two_dates.
- DATA: date_to TYPE datum.
- DATA: BEGIN OF datum_von,
- jjjj(4) TYPE n,
- mm(2) TYPE n,
- tt(2) TYPE n,
- END OF datum_von.
-
- DATA: BEGIN OF datum_bis,
- jjjj(4) TYPE n,
- mm(2) TYPE n,
- tt(2) TYPE n,
- END OF datum_bis.
-
- e_month = 0.
-
- CHECK i_date_from IS NOT INITIAL AND i_date_to IS NOT INITIAL.
-
- date_to = i_date_to.
- IF i_incl_to = abap_true.
- date_to = date_to + 1.
- ENDIF.
-
- datum_von = i_date_from.
- datum_bis = date_to.
-
- e_month = ( datum_bis-jjjj - datum_von-jjjj ) * 12
- + ( datum_bis-mm - datum_von-mm ).
- ENDMETHOD. "MONTHS_BETWEEN_TWO_DATES
-ENDCLASS. "ZCL_DATE_CALCULATION IMPLEMENTATION
-
-*----------------------------------------------------------------------*
-* CLASS zcl_date_calculation_test DEFINITION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS zcl_date_calculation_test DEFINITION FOR TESTING
- DURATION SHORT
- RISK LEVEL HARMLESS
- .
- PRIVATE SECTION.
- METHODS:
- months_between_two_dates FOR TESTING.
-ENDCLASS. "zcl_date_calculation_test DEFINITION
-*----------------------------------------------------------------------*
-* CLASS zcl_date_calculation_test IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS zcl_date_calculation_test IMPLEMENTATION.
- METHOD months_between_two_dates.
-
- DATA: date_from TYPE datum VALUE '20120101',
- date_to TYPE datum VALUE '20121231'.
- DATA: month TYPE i.
-
- zcl_date_calculation=>months_between_two_dates(
- EXPORTING
- i_date_from = date_from
- i_date_to = date_to
- i_incl_to = abap_true
- IMPORTING
- e_month = month
- ).
-
- cl_abap_unit_assert=>assert_equals(
- exp = 12 " Data Object with Expected Type
- act = month " Data Object with Current Value
- msg = 'Calculated date is wrong' " Message in Case of Error
- ).
-
- ENDMETHOD. "months_between_two_dates
-ENDCLASS. "zcl_date_calculation_test IMPLEMENTATION
-*----------------------------------------------------------------------*
-* CLASS zcl_helper DEFINITION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS zcl_helper DEFINITION.
- PUBLIC SECTION.
- CLASS-METHODS:
- load_image
- IMPORTING
- filename TYPE string
- RETURNING VALUE(r_image) TYPE xstring,
- add_calendar
- IMPORTING
- i_date_from TYPE datum
- i_date_to TYPE datum
- i_from_row TYPE zexcel_cell_row
- i_from_col TYPE zexcel_cell_column_alpha
- i_day_style TYPE zexcel_cell_style
- i_cw_style TYPE zexcel_cell_style
- CHANGING
- c_worksheet TYPE REF TO zcl_excel_worksheet
- RAISING
- zcx_excel,
- add_calendar_landscape
- IMPORTING
- i_date_from TYPE datum
- i_date_to TYPE datum
- i_from_row TYPE zexcel_cell_row
- i_from_col TYPE zexcel_cell_column_alpha
- i_day_style TYPE zexcel_cell_style
- i_cw_style TYPE zexcel_cell_style
- CHANGING
- c_worksheet TYPE REF TO zcl_excel_worksheet
- RAISING
- zcx_excel,
- add_a2x_footer
- IMPORTING
- i_from_row TYPE zexcel_cell_row
- i_from_col TYPE zexcel_cell_column_alpha
- CHANGING
- c_worksheet TYPE REF TO zcl_excel_worksheet
- RAISING
- zcx_excel,
- add_calender_week
- IMPORTING
- i_date TYPE datum
- i_row TYPE zexcel_cell_row
- i_col TYPE zexcel_cell_column_alpha
- i_style TYPE zexcel_cell_style
- CHANGING
- c_worksheet TYPE REF TO zcl_excel_worksheet
- RAISING
- zcx_excel.
-ENDCLASS. "zcl_helper DEFINITION
-
-*----------------------------------------------------------------------*
-* CLASS zcl_helper IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS zcl_helper IMPLEMENTATION.
- METHOD load_image.
- "Load samle image
- DATA: lt_bin TYPE solix_tab,
- lv_len TYPE i.
-
- CALL METHOD cl_gui_frontend_services=>gui_upload
- EXPORTING
- filename = filename
- filetype = 'BIN'
- IMPORTING
- filelength = lv_len
- CHANGING
- data_tab = lt_bin
- EXCEPTIONS
- file_open_error = 1
- file_read_error = 2
- no_batch = 3
- gui_refuse_filetransfer = 4
- invalid_type = 5
- no_authority = 6
- unknown_error = 7
- bad_data_format = 8
- header_not_allowed = 9
- separator_not_allowed = 10
- header_too_long = 11
- unknown_dp_error = 12
- access_denied = 13
- dp_out_of_memory = 14
- disk_full = 15
- dp_timeout = 16
- not_supported_by_gui = 17
- error_no_gui = 18
- OTHERS = 19.
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
-
- CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
- EXPORTING
- input_length = lv_len
- IMPORTING
- buffer = r_image
- TABLES
- binary_tab = lt_bin
- EXCEPTIONS
- failed = 1
- OTHERS = 2.
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
- ENDMETHOD. "load_image
- METHOD add_calendar.
- DATA: day_names TYPE TABLE OF t246.
- DATA: row TYPE zexcel_cell_row,
- row_max TYPE i,
- col_int TYPE zexcel_cell_column,
- col_max TYPE i,
- from_col_int TYPE zexcel_cell_column,
- col TYPE zexcel_cell_column_alpha,
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row.
- DATA: lv_date TYPE datum,
- value TYPE string,
- weekday TYPE wotnr,
- weekrow TYPE wotnr VALUE 1,
- day TYPE i,
- width TYPE f,
- height TYPE f.
- DATA: hyperlink TYPE REF TO zcl_excel_hyperlink.
-
- FIELD-SYMBOLS: LIKE LINE OF day_names.
-
- lv_date = i_date_from.
- from_col_int = zcl_excel_common=>convert_column2int( i_from_col ).
- " Add description for Calendar Week
- c_worksheet->set_cell(
- EXPORTING
- ip_column = i_from_col " Cell Column
- ip_row = i_from_row " Cell Row
- ip_value = 'CW'(001) " Cell Value
- ip_style = i_cw_style
- ).
-
- " Add Days
- CALL FUNCTION 'DAY_NAMES_GET'
- TABLES
- day_names = day_names.
-
- LOOP AT day_names ASSIGNING .
- row = i_from_row.
- col_int = from_col_int + -wotnr.
- col = zcl_excel_common=>convert_column2alpha( col_int ).
- value = -langt.
- c_worksheet->set_cell(
- EXPORTING
- ip_column = col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = i_cw_style
- ).
- ENDLOOP.
-
- WHILE lv_date <= i_date_to.
- day = lv_date+6(2).
- CALL FUNCTION 'FIMA_X_DAY_IN_MONTH_COMPUTE'
- EXPORTING
- i_datum = lv_date
- IMPORTING
- e_wochentag_nr = weekday.
-
- row = i_from_row + weekrow.
- col_int = from_col_int + weekday.
- col = zcl_excel_common=>convert_column2alpha( col_int ).
-
- value = day.
- CONDENSE value.
-
- c_worksheet->set_cell(
- EXPORTING
- ip_column = col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = i_day_style " Single-Character Indicator
- ).
-
- IF weekday = 7.
- " Add Calender Week
- zcl_helper=>add_calender_week(
- EXPORTING
- i_date = lv_date
- i_row = row
- i_col = i_from_col
- i_style = i_cw_style
- CHANGING
- c_worksheet = c_worksheet
- ).
- weekrow = weekrow + 1.
- ENDIF.
- lv_date = lv_date + 1.
- ENDWHILE.
- " Add Calender Week
- zcl_helper=>add_calender_week(
- EXPORTING
- i_date = lv_date
- i_row = row
- i_col = i_from_col
- i_style = i_cw_style
- CHANGING
- c_worksheet = c_worksheet
- ).
- " Add Created with abap2xlsx
- row = row + 2.
- zcl_helper=>add_a2x_footer(
- EXPORTING
- i_from_row = row
- i_from_col = i_from_col
- CHANGING
- c_worksheet = c_worksheet
- ).
- col_int = from_col_int.
- col_max = from_col_int + 7.
- WHILE col_int <= col_max.
- col = zcl_excel_common=>convert_column2alpha( col_int ).
- IF sy-index = 1.
- width = '5.0'.
- ELSE.
- width = '11.4'.
- ENDIF.
- lo_column = c_worksheet->get_column( col ).
- lo_column->set_width( width ).
- col_int = col_int + 1.
- ENDWHILE.
- row = i_from_row + 1.
- row_max = i_from_row + 6.
- WHILE row <= row_max.
- height = 50.
- lo_row = c_worksheet->get_row( row ).
- lo_row->set_row_height( height ).
- row = row + 1.
- ENDWHILE.
- ENDMETHOD. "add_calendar
- METHOD add_a2x_footer.
- DATA: value TYPE string,
- hyperlink TYPE REF TO zcl_excel_hyperlink.
-
- value = 'Created with https://github.com/abap2xlsx/abap2xlsx'(002).
- hyperlink = zcl_excel_hyperlink=>create_external_link( 'https://github.com/abap2xlsx/abap2xlsx' ). "#EC NOTEXT
- c_worksheet->set_cell(
- EXPORTING
- ip_column = i_from_col " Cell Column
- ip_row = i_from_row " Cell Row
- ip_value = value " Cell Value
- ip_hyperlink = hyperlink
- ).
-
- ENDMETHOD. "add_a2x_footer
- METHOD add_calendar_landscape.
- DATA: day_names TYPE TABLE OF t246.
-
- DATA: lv_date TYPE datum,
- day TYPE i,
- value TYPE string,
- weekday TYPE wotnr.
- DATA: row TYPE zexcel_cell_row,
- from_col_int TYPE zexcel_cell_column,
- col_int TYPE zexcel_cell_column,
- col TYPE zexcel_cell_column_alpha.
- DATA: lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row.
-
- FIELD-SYMBOLS: LIKE LINE OF day_names.
-
- lv_date = i_date_from.
- " Add Days
- CALL FUNCTION 'DAY_NAMES_GET'
- TABLES
- day_names = day_names.
-
- WHILE lv_date <= i_date_to.
- day = lv_date+6(2).
- CALL FUNCTION 'FIMA_X_DAY_IN_MONTH_COMPUTE'
- EXPORTING
- i_datum = lv_date
- IMPORTING
- e_wochentag_nr = weekday.
- " Day name row
- row = i_from_row.
- col_int = from_col_int + day + 2.
- col = zcl_excel_common=>convert_column2alpha( col_int ).
- READ TABLE day_names ASSIGNING
- WITH KEY wotnr = weekday.
- value = -kurzt.
- c_worksheet->set_cell(
- EXPORTING
- ip_column = col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = i_cw_style
- ).
-
- " Day row
- row = i_from_row + 1.
- value = day.
- CONDENSE value.
-
- c_worksheet->set_cell(
- EXPORTING
- ip_column = col " Cell Column
- ip_row = row " Cell Row
- ip_value = value " Cell Value
- ip_style = i_day_style " Single-Character Indicator
- ).
- " width
- lo_column = c_worksheet->get_column( col ).
- lo_column->set_width( '3.6' ).
-
-
- lv_date = lv_date + 1.
- ENDWHILE.
- " Add ABAP2XLSX Footer
- row = i_from_row + 2.
- c_worksheet->set_cell(
- EXPORTING
- ip_column = col " Cell Column
- ip_row = row " Cell Row
- ip_value = ' ' " Cell Value
- ).
- lo_row = c_worksheet->get_row( row ).
- lo_row->set_row_height( '5.0' ).
- row = i_from_row + 3.
- zcl_helper=>add_a2x_footer(
- EXPORTING
- i_from_row = row
- i_from_col = i_from_col
- CHANGING
- c_worksheet = c_worksheet
- ).
-
- " Set with for all 31 coulumns
- WHILE day < 32.
- day = day + 1.
- col_int = from_col_int + day + 2.
- col = zcl_excel_common=>convert_column2alpha( col_int ).
- " width
- lo_column = c_worksheet->get_column( col ).
- lo_column->set_width( '3.6' ).
- ENDWHILE.
- ENDMETHOD. "ADD_CALENDAR_LANDSCAPE
-
- METHOD add_calender_week.
- DATA: week TYPE kweek,
- week_int TYPE i,
- value TYPE string.
- " Add Calender Week
- CALL FUNCTION 'DATE_GET_WEEK'
- EXPORTING
- date = i_date " Date for which the week should be calculated
- IMPORTING
- week = week. " Week for date (format:YYYYWW)
- value = week+4(2).
- week_int = value.
- value = week_int.
- CONDENSE value.
- c_worksheet->set_cell(
- EXPORTING
- ip_column = i_col " Cell Column
- ip_row = i_row " Cell Row
- ip_value = value " Cell Value
- ip_style = i_style
- ).
- ENDMETHOD. "add_calender_week
-ENDCLASS. "zcl_helper IMPLEMENTATION
diff --git a/src/demos/zdemo_calendar_classes.prog.xml b/src/demos/zdemo_calendar_classes.prog.xml
deleted file mode 100644
index bdad86c..0000000
--- a/src/demos/zdemo_calendar_classes.prog.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
- ZDEMO_CALENDAR_CLASSES
- I
- E
- X
-
-
- -
- R
- Include ZDEMO_CALENDAR_CLASSES
- 30
-
-
-
-
-
diff --git a/src/demos/zdemo_excel.prog.abap b/src/demos/zdemo_excel.prog.abap
deleted file mode 100644
index f4b64fd..0000000
--- a/src/demos/zdemo_excel.prog.abap
+++ /dev/null
@@ -1,91 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel.
-
-DATA: lv_workdir TYPE string,
- lv_filesep TYPE c LENGTH 1,
- lv_upfile TYPE string.
-
-
-PARAMETERS: p_path TYPE zexcel_export_dir.
-PARAMETERS: p_checkr NO-DISPLAY TYPE abap_bool.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
- lv_workdir = p_path.
- cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
- CHANGING selected_folder = lv_workdir ).
- p_path = lv_workdir.
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
-
-START-OF-SELECTION.
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
-
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_filesep ).
- CONCATENATE p_path lv_filesep '01_HelloWorld.xlsx' INTO lv_upfile.
-
- SUBMIT zdemo_excel1 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Hello world
- SUBMIT zdemo_excel2 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Styles
- SUBMIT zdemo_excel3 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path WITH p_checkr = p_checkr AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: iTab binding
- SUBMIT zdemo_excel4 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Multi sheets, page setup and sheet properties
- SUBMIT zdemo_excel5 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Conditional formatting
- SUBMIT zdemo_excel6 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Formulas
- SUBMIT zdemo_excel7 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Conditional formatting
- SUBMIT zdemo_excel8 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Ranges
- SUBMIT zdemo_excel9 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Data validation
- SUBMIT zdemo_excel10 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Bind table with field catalog
- " zdemo_excel11 is not added because it has a selection screen and
- " you also need to have business partners maintained in transaction BP
- SUBMIT zdemo_excel12 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Column size
- SUBMIT zdemo_excel13 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Merge cell
- SUBMIT zdemo_excel14 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Alignment
- " zdemo_excel15 added at the end
- SUBMIT zdemo_excel16 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Drawing
- SUBMIT zdemo_excel17 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Lock sheet
- SUBMIT zdemo_excel18 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Lock workbook
- SUBMIT zdemo_excel19 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Set active sheet
- " zdemo_excel20 is not added because it uses ALV and cannot be processed (OLE2)
- SUBMIT zdemo_excel21 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Color Picker
- SUBMIT zdemo_excel22 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Bind table with field catalog & sheet style
- SUBMIT zdemo_excel23 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Multiple sheets with and w/o grid lines, print options
- SUBMIT zdemo_excel24 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Multiple sheets with different default date formats
- " zdemo_excel25 is not processed because the default logical path may not exist, and anyway zdemo_excel25 doesn't demonstrate any abap2xlsx feature
- " zdemo_excel26 is not added because it uses ALV and cannot be processed (Native)
- SUBMIT zdemo_excel27 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Conditional Formatting
- SUBMIT zdemo_excel28 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: CSV writer
- " SUBMIT zdemo_excel29 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Macro enabled workbook
- SUBMIT zdemo_excel30 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: ABAP Cell data types + leading blanks string
- SUBMIT zdemo_excel31 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Autosize Column with different Font sizes
- " zdemo_excel32 is not added because it uses ALV and cannot be processed (Native)
- SUBMIT zdemo_excel33 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Table autofilter
- SUBMIT zdemo_excel34 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Static Styles Chess
- SUBMIT zdemo_excel35 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Static Styles
- SUBMIT zdemo_excel36 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Style applied to sheet, column and single cell
- SUBMIT zdemo_excel37 WITH p_upfile = lv_upfile
- WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Simplest call of the reader and writer - passthrough data
- SUBMIT zdemo_excel38 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Show off integration of drawings ( here using the SAP-Icons )
- SUBMIT zdemo_excel39 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Charts
- SUBMIT zdemo_excel40 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Demo Printsettings
- SUBMIT zdemo_excel41 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Inheritance
- SUBMIT zdemo_excel44 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: No line if empty
- SUBMIT zdemo_excel49 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Bind Table with field having Conversion Exit
-
- SUBMIT zdemo_excel_comments WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Comments
- SUBMIT ztest_excel_image_header WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Image in Header and Footer
- "
- " Reader/Writer Demo must always run at the end
- " to make sure all documents where created
- "
- SUBMIT zdemo_excel15 WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT Read Excel and write it back
diff --git a/src/demos/zdemo_excel.prog.xml b/src/demos/zdemo_excel.prog.xml
deleted file mode 100644
index 6efcb28..0000000
--- a/src/demos/zdemo_excel.prog.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo:
- 15
-
- -
- S
- P_PATH
- Select output path
- 26
-
-
-
-
-
diff --git a/src/demos/zdemo_excel1.prog.abap b/src/demos/zdemo_excel1.prog.abap
deleted file mode 100644
index e1505a1..0000000
--- a/src/demos/zdemo_excel1.prog.abap
+++ /dev/null
@@ -1,64 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL1
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel1.
-
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
- lo_column TYPE REF TO zcl_excel_column,
- lv_date TYPE d,
- lv_time TYPE t.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '01_HelloWorld.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
- lv_date = '20211231'.
- lv_time = '055817'.
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = lv_date ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = lv_time ).
- lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://abap2xlsx.github.io/abap2xlsx' ).
- lo_worksheet->set_cell( ip_columnrow = 'B4' ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ).
-
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = '你好,世界' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = '(Chinese)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 7 ip_value = 'नमस्ते दुनिया' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 7 ip_value = '(Hindi)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 8 ip_value = 'Hola Mundo' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 8 ip_value = '(Spanish)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'مرحبا بالعالم' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 9 ip_value = '(Arabic)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 10 ip_value = 'ওহে বিশ্ব ' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 10 ip_value = '(Bengali)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 11 ip_value = 'Bonjour le monde' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 11 ip_value = '(French)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 12 ip_value = 'Olá Mundo' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 12 ip_value = '(Portuguese)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 13 ip_value = 'Привет, мир' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 13 ip_value = '(Russian)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 14 ip_value = 'ہیلو دنیا' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 14 ip_value = '(Urdu)' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 15 ip_value = '👋🌎, 👋🌍, 👋🌏' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 15 ip_value = '(Emoji waving hand + 3 parts of the world)' ).
-
- lo_column = lo_worksheet->get_column( ip_column = 'B' ).
- lo_column->set_width( ip_width = 11 ).
-
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel1.prog.xml b/src/demos/zdemo_excel1.prog.xml
deleted file mode 100644
index 6f74323..0000000
--- a/src/demos/zdemo_excel1.prog.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL1
- 1
- T
- E
- X
- X
-
-
- -
- S
- P_PATH
- .
- 9
- D
-
- -
- S
- RB_BACK
- 17
-
- -
- R
- abap2xlsx Demo: Hello World
- 28
-
-
-
-
-
diff --git a/src/demos/zdemo_excel10.prog.abap b/src/demos/zdemo_excel10.prog.abap
deleted file mode 100644
index 6393f2b..0000000
--- a/src/demos/zdemo_excel10.prog.abap
+++ /dev/null
@@ -1,144 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL10
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel10.
-
-TYPES: ty_sflight_lines TYPE TABLE OF sflight.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_cond TYPE REF TO zcl_excel_style_cond,
- lo_column TYPE REF TO zcl_excel_column.
-
-DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
- ls_table_settings TYPE zexcel_s_table_settings,
- ls_iconset TYPE zexcel_conditional_iconset.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '10_iTabFieldCatalog.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- FIELD-SYMBOLS: TYPE zexcel_s_fieldcatalog.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Internal table' ).
-
- ls_iconset-iconset = zcl_excel_style_cond=>c_iconset_5arrows.
- ls_iconset-cfvo1_type = zcl_excel_style_cond=>c_cfvo_type_percent.
- ls_iconset-cfvo1_value = '0'.
- ls_iconset-cfvo2_type = zcl_excel_style_cond=>c_cfvo_type_percent.
- ls_iconset-cfvo2_value = '20'.
- ls_iconset-cfvo3_type = zcl_excel_style_cond=>c_cfvo_type_percent.
- ls_iconset-cfvo3_value = '40'.
- ls_iconset-cfvo4_type = zcl_excel_style_cond=>c_cfvo_type_percent.
- ls_iconset-cfvo4_value = '60'.
- ls_iconset-cfvo5_type = zcl_excel_style_cond=>c_cfvo_type_percent.
- ls_iconset-cfvo5_value = '80'.
- ls_iconset-showvalue = zcl_excel_style_cond=>c_showvalue_true.
-
- "cond style
- lo_style_cond = lo_worksheet->add_new_style_cond( ).
- lo_style_cond->rule = zcl_excel_style_cond=>c_rule_iconset.
- lo_style_cond->mode_iconset = ls_iconset.
- lo_style_cond->priority = 1.
-
- DATA lt_test TYPE ty_sflight_lines.
- PERFORM load_fixed_data CHANGING lt_test.
-
- lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = lt_test ).
-
- LOOP AT lt_field_catalog ASSIGNING .
- CASE -fieldname.
- WHEN 'CARRID'.
- -position = 3.
- -dynpfld = abap_true.
- -totals_function = zcl_excel_table=>totals_function_count.
- WHEN 'CONNID'.
- -position = 4.
- -dynpfld = abap_true.
- -abap_type = cl_abap_typedescr=>typekind_int.
- "This avoid the excel warning that the number is formatted as a text: abap2xlsx is not able to recognize numc as a number so it formats the number as a text with
- "the related warning. You can force the type and the framework will correctly format the number as a number
- WHEN 'FLDATE'.
- -position = 2.
- -dynpfld = abap_true.
- WHEN 'PRICE'.
- -position = 1.
- -dynpfld = abap_true.
- -totals_function = zcl_excel_table=>totals_function_sum.
- -style_cond = lo_style_cond->get_guid( ).
- WHEN OTHERS.
- -dynpfld = abap_false.
- ENDCASE.
- ENDLOOP.
-
- ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium5.
-
- lo_worksheet->bind_table( ip_table = lt_test
- is_table_settings = ls_table_settings
- it_field_catalog = lt_field_catalog ).
-
- lo_column = lo_worksheet->get_column( ip_column = 'D' ). "make date field a bit wider
- lo_column->set_width( ip_width = 13 ).
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
-
-
-FORM load_fixed_data CHANGING ct_test TYPE ty_sflight_lines.
- DATA: lt_lines TYPE TABLE OF string,
- lv_line TYPE string,
- lt_fields TYPE TABLE OF string,
- lv_comp TYPE i,
- lv_field TYPE string,
- ls_test TYPE sflight.
- FIELD-SYMBOLS: TYPE simple.
-
- APPEND 'AA 0017 20171219 422 USD 747-400 385 371 191334 31 28 21 21' TO lt_lines.
- APPEND 'AA 0017 20180309 422 USD 747-400 385 365 189984 31 29 21 20' TO lt_lines.
- APPEND 'AA 0017 20180528 422 USD 747-400 385 374 193482 31 30 21 20' TO lt_lines.
- APPEND 'AA 0017 20180816 422 USD 747-400 385 372 193127 31 30 21 20' TO lt_lines.
- APPEND 'AA 0017 20181104 422 USD 747-400 385 44 23908 31 4 21 3' TO lt_lines.
- APPEND 'AA 0017 20190123 422 USD 747-400 385 40 20347 31 3 21 2' TO lt_lines.
- APPEND 'AZ 0555 20171219 185 EUR 737-800 140 133 32143 12 12 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180309 185 EUR 737-800 140 137 32595 12 12 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180528 185 EUR 737-800 140 134 31899 12 11 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180816 185 EUR 737-800 140 128 29775 12 10 10 9' TO lt_lines.
- APPEND 'AZ 0555 20181104 185 EUR 737-800 140 0 0 12 0 10 0' TO lt_lines.
- APPEND 'AZ 0555 20190123 185 EUR 737-800 140 23 5392 12 1 10 2' TO lt_lines.
- APPEND 'AZ 0789 20171219 1030 EUR 767-200 260 250 307176 21 20 11 11' TO lt_lines.
- APPEND 'AZ 0789 20180309 1030 EUR 767-200 260 252 306054 21 20 11 10' TO lt_lines.
- APPEND 'AZ 0789 20180528 1030 EUR 767-200 260 252 307063 21 20 11 10' TO lt_lines.
- APPEND 'AZ 0789 20180816 1030 EUR 767-200 260 249 300739 21 19 11 10' TO lt_lines.
- APPEND 'AZ 0789 20181104 1030 EUR 767-200 260 104 127647 21 8 11 5' TO lt_lines.
- APPEND 'AZ 0789 20190123 1030 EUR 767-200 260 18 22268 21 1 11 1' TO lt_lines.
- APPEND 'DL 0106 20171217 611 USD A380-800 475 458 324379 30 29 20 20' TO lt_lines.
- APPEND 'DL 0106 20180307 611 USD A380-800 475 458 324330 30 30 20 20' TO lt_lines.
- APPEND 'DL 0106 20180526 611 USD A380-800 475 459 328149 30 29 20 20' TO lt_lines.
- APPEND 'DL 0106 20180814 611 USD A380-800 475 462 326805 30 30 20 18' TO lt_lines.
- APPEND 'DL 0106 20181102 611 USD A380-800 475 167 115554 30 10 20 6' TO lt_lines.
- APPEND 'DL 0106 20190121 611 USD A380-800 475 11 9073 30 1 20 1' TO lt_lines.
- LOOP AT lt_lines INTO lv_line.
- CONDENSE lv_line.
- SPLIT lv_line AT space INTO TABLE lt_fields.
- lv_comp = 2.
- LOOP AT lt_fields INTO lv_field.
- ASSIGN COMPONENT lv_comp OF STRUCTURE ls_test TO .
- = lv_field.
- lv_comp = lv_comp + 1.
- ENDLOOP.
- APPEND ls_test TO ct_test.
- ENDLOOP.
-ENDFORM.
diff --git a/src/demos/zdemo_excel10.prog.xml b/src/demos/zdemo_excel10.prog.xml
deleted file mode 100644
index 7ee7b60..0000000
--- a/src/demos/zdemo_excel10.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL10
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Format internal table with field catalog
- 57
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel11.prog.abap b/src/demos/zdemo_excel11.prog.abap
deleted file mode 100644
index 52215d3..0000000
--- a/src/demos/zdemo_excel11.prog.abap
+++ /dev/null
@@ -1,372 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL11
-*& Export Organisation and Contact Persons using ABAP2XLSX
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel11.
-
-DATA: central_search TYPE bapibus1006_central_search,
- addressdata_search TYPE bapibus1006_addr_search,
- others_search TYPE bapibus1006_other_data.
-DATA: searchresult TYPE TABLE OF bapibus1006_bp_addr,
- return TYPE TABLE OF bapiret2.
-DATA: lines TYPE i.
-FIELD-SYMBOLS: LIKE LINE OF searchresult.
-DATA: centraldata TYPE bapibus1006_central,
- centraldataperson TYPE bapibus1006_central_person,
- centraldataorganization TYPE bapibus1006_central_organ.
-DATA: addressdata TYPE bapibus1006_address.
-DATA: relationships TYPE TABLE OF bapibus1006_relations.
-FIELD-SYMBOLS: LIKE LINE OF relationships.
-DATA: relationship_centraldata TYPE bapibus1006002_central.
-DATA: relationship_addresses TYPE TABLE OF bapibus1006002_addresses.
-FIELD-SYMBOLS: LIKE LINE OF relationship_addresses.
-
-DATA: lt_download TYPE TABLE OF zexcel_s_org_rel.
-FIELD-SYMBOLS: LIKE LINE OF lt_download.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '11_Export_Org_and_Contact.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-PARAMETERS: md TYPE flag RADIOBUTTON GROUP act.
-
-SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE TEXT-00a.
-PARAMETERS: partnerc TYPE bu_type DEFAULT 2, " Organizations
- postlcod TYPE ad_pstcd1 DEFAULT '8334*',
- country TYPE land1 DEFAULT 'DE',
- maxsel TYPE bu_maxsel DEFAULT 100.
-SELECTION-SCREEN END OF BLOCK a.
-
-PARAMETERS: rel TYPE flag RADIOBUTTON GROUP act DEFAULT 'X'.
-
-SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE TEXT-00b.
-PARAMETERS: reltyp TYPE bu_reltyp DEFAULT 'BUR011',
- partner TYPE bu_partner DEFAULT '191'.
-SELECTION-SCREEN END OF BLOCK b.
-
-START-OF-SELECTION.
- IF md = abap_true.
- " Read all Companies by Master Data
- central_search-partnercategory = partnerc.
- addressdata_search-postl_cod1 = postlcod.
- addressdata_search-country = country.
- others_search-maxsel = maxsel.
- others_search-no_search_for_contactperson = 'X'.
-
- CALL FUNCTION 'BAPI_BUPA_SEARCH_2'
- EXPORTING
- centraldata = central_search
- addressdata = addressdata_search
- others = others_search
- TABLES
- searchresult = searchresult
- return = return.
-
- SORT searchresult BY partner.
- DELETE ADJACENT DUPLICATES FROM searchresult COMPARING partner.
- ELSEIF rel = abap_true.
- " Read by Relationship
- SELECT but050~partner1 AS partner FROM but050
- INNER JOIN but000 ON but000~partner = but050~partner1 AND but000~type = '2'
- INTO CORRESPONDING FIELDS OF TABLE searchresult
- WHERE but050~partner2 = partner
- AND but050~reltyp = reltyp.
- ENDIF.
-
- DESCRIBE TABLE searchresult LINES lines.
- WRITE: / 'Number of search results: ', lines.
-
- LOOP AT searchresult ASSIGNING .
- " Read Details of Organization
- CALL FUNCTION 'BAPI_BUPA_CENTRAL_GETDETAIL'
- EXPORTING
- businesspartner = -partner
- IMPORTING
- centraldataorganization = centraldataorganization.
- " Read Standard Address of Organization
- CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
- EXPORTING
- businesspartner = -partner
- IMPORTING
- addressdata = addressdata.
-
- " Add Organization to Download
- APPEND INITIAL LINE TO lt_download ASSIGNING .
- " Fill Organization Partner Numbers
- CALL FUNCTION 'BAPI_BUPA_GET_NUMBERS'
- EXPORTING
- businesspartner = -partner
- IMPORTING
- businesspartnerout = -org_number
- businesspartnerguidout = -org_guid.
-
- MOVE-CORRESPONDING centraldataorganization TO .
- MOVE-CORRESPONDING addressdata TO .
- CLEAR: addressdata.
-
- " Read all Relationships
- CLEAR: relationships.
- CALL FUNCTION 'BAPI_BUPA_RELATIONSHIPS_GET'
- EXPORTING
- businesspartner = -partner
- TABLES
- relationships = relationships.
- DELETE relationships WHERE relationshipcategory <> 'BUR001'.
- LOOP AT relationships ASSIGNING .
- " Read details of Contact person
- CALL FUNCTION 'BAPI_BUPA_CENTRAL_GETDETAIL'
- EXPORTING
- businesspartner = -partner2
- IMPORTING
- centraldata = centraldata
- centraldataperson = centraldataperson.
- " Read details of the Relationship
- CALL FUNCTION 'BAPI_BUPR_CONTP_GETDETAIL'
- EXPORTING
- businesspartner = -partner1
- contactperson = -partner2
- IMPORTING
- centraldata = relationship_centraldata.
- " Read relationship address
- CLEAR: relationship_addresses.
-
- CALL FUNCTION 'BAPI_BUPR_CONTP_ADDRESSES_GET'
- EXPORTING
- businesspartner = -partner1
- contactperson = -partner2
- TABLES
- addresses = relationship_addresses.
-
- READ TABLE relationship_addresses
- ASSIGNING
- WITH KEY standardaddress = 'X'.
-
- IF sy-subrc = 0.
- " Read Relationship Address
- CLEAR addressdata.
- CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
- EXPORTING
- businesspartner = -partner
- addressguid = -addressguid
- IMPORTING
- addressdata = addressdata.
-
- APPEND INITIAL LINE TO lt_download ASSIGNING .
- CALL FUNCTION 'BAPI_BUPA_GET_NUMBERS'
- EXPORTING
- businesspartner = -partner1
- IMPORTING
- businesspartnerout = -org_number
- businesspartnerguidout = -org_guid.
-
- CALL FUNCTION 'BAPI_BUPA_GET_NUMBERS'
- EXPORTING
- businesspartner = -partner2
- IMPORTING
- businesspartnerout = -contpers_number
- businesspartnerguidout = -contpers_guid.
-
- MOVE-CORRESPONDING centraldataorganization TO .
- MOVE-CORRESPONDING addressdata TO .
- MOVE-CORRESPONDING centraldataperson TO .
- MOVE-CORRESPONDING relationship_centraldata TO .
-
- WRITE: / -partner1, -partner2.
- WRITE: centraldataorganization-name1(20), centraldataorganization-name2(10).
- WRITE: centraldataperson-firstname(15), centraldataperson-lastname(15).
- WRITE: addressdata-street(25), addressdata-house_no,
- addressdata-postl_cod1, addressdata-city(25).
- ENDIF.
- ENDLOOP.
-
- ENDLOOP.
-
- DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_body TYPE REF TO zcl_excel_style,
- lo_border_dark TYPE REF TO zcl_excel_style_border,
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row.
-
- DATA: lv_style_body_even_guid TYPE zexcel_cell_style,
- lv_style_body_green TYPE zexcel_cell_style.
-
- DATA: row TYPE zexcel_cell_row.
-
- DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
- ls_table_settings TYPE zexcel_s_table_settings.
-
- DATA: column TYPE zexcel_cell_column,
- column_alpha TYPE zexcel_cell_column_alpha,
- value TYPE zexcel_cell_value.
-
- FIELD-SYMBOLS: TYPE zexcel_s_fieldcatalog.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Create border object
- CREATE OBJECT lo_border_dark.
- lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
- lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
- "Create style with border even
- lo_style_body = lo_excel->add_new_style( ).
- lo_style_body->fill->fgcolor-rgb = zcl_excel_style_color=>c_yellow.
- lo_style_body->borders->allborders = lo_border_dark.
- lv_style_body_even_guid = lo_style_body->get_guid( ).
- "Create style with border and green fill
- lo_style_body = lo_excel->add_new_style( ).
- lo_style_body->fill->fgcolor-rgb = zcl_excel_style_color=>c_green.
- lo_style_body->borders->allborders = lo_border_dark.
- lv_style_body_green = lo_style_body->get_guid( ).
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Internal table' ).
-
- lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = lt_download ).
-
- LOOP AT lt_field_catalog ASSIGNING .
- CASE -fieldname.
- WHEN 'ORG_NUMBER'.
- -position = 1.
- -dynpfld = abap_true.
- WHEN 'CONTPERS_NUMBER'.
- -position = 2.
- -dynpfld = abap_true.
- WHEN 'NAME1'.
- -position = 3.
- -dynpfld = abap_true.
- WHEN 'NAME2'.
- -position = 4.
- -dynpfld = abap_true.
- WHEN 'STREET'.
- -position = 5.
- -dynpfld = abap_true.
- WHEN 'HOUSE_NO'.
- -position = 6.
- -dynpfld = abap_true.
- WHEN 'POSTL_COD1'.
- -position = 7.
- -dynpfld = abap_true.
- WHEN 'CITY'.
- -position = 8.
- -dynpfld = abap_true.
- WHEN 'COUNTRYISO'.
- -position = 9.
- -dynpfld = abap_true.
- WHEN 'FIRSTNAME'.
- -position = 10.
- -dynpfld = abap_true.
- WHEN 'LASTNAME'.
- -position = 11.
- -dynpfld = abap_true.
- WHEN 'FUNCTIONNAME'.
- -position = 12.
- -dynpfld = abap_true.
- WHEN 'DEPARTMENTNAME'.
- -position = 13.
- -dynpfld = abap_true.
- WHEN 'TEL1_NUMBR'.
- -position = 14.
- -dynpfld = abap_true.
- WHEN 'TEL1_EXT'.
- -position = 15.
- -dynpfld = abap_true.
- WHEN 'FAX_NUMBER'.
- -position = 16.
- -dynpfld = abap_true.
- WHEN 'FAX_EXTENS'.
- -position = 17.
- -dynpfld = abap_true.
- WHEN 'E_MAIL'.
- -position = 18.
- -dynpfld = abap_true.
- WHEN OTHERS.
- -dynpfld = abap_false.
- ENDCASE.
- ENDLOOP.
-
- ls_table_settings-top_left_column = 'A'.
- ls_table_settings-top_left_row = '2'.
- ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium5.
-
- lo_worksheet->bind_table( ip_table = lt_download
- is_table_settings = ls_table_settings
- it_field_catalog = lt_field_catalog ).
- LOOP AT lt_download ASSIGNING .
- row = sy-tabix + 2.
- IF NOT -org_number IS INITIAL
- AND -contpers_number IS INITIAL.
- " Mark fields of Organization which can be changed green
- lo_worksheet->set_cell_style(
- ip_column = 'C'
- ip_row = row
- ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'D'
- ip_row = row
- ip_style = lv_style_body_green
- ).
-* CATCH zcx_excel. " Exceptions for ABAP2XLSX
- ELSEIF NOT -org_number IS INITIAL
- AND NOT -contpers_number IS INITIAL.
- " Mark fields of Relationship which can be changed green
- lo_worksheet->set_cell_style(
- ip_column = 'L' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'M' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'N' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'O' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'P' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'Q' ip_row = row ip_style = lv_style_body_green
- ).
- lo_worksheet->set_cell_style(
- ip_column = 'R' ip_row = row ip_style = lv_style_body_green
- ).
- ENDIF.
- ENDLOOP.
- " Add Fieldnames in first row and hide the row
- LOOP AT lt_field_catalog ASSIGNING
- WHERE position <> '' AND dynpfld = abap_true.
- column = -position.
- column_alpha = zcl_excel_common=>convert_column2alpha( column ).
- value = -fieldname.
- lo_worksheet->set_cell( ip_column = column_alpha
- ip_row = 1
- ip_value = value
- ip_style = lv_style_body_even_guid ).
- ENDLOOP.
- " Hide first row
- lo_row = lo_worksheet->get_row( 1 ).
- lo_row->set_visible( abap_false ).
-
- DATA: highest_column TYPE zexcel_cell_column,
- count TYPE int4,
- col_alpha TYPE zexcel_cell_column_alpha.
-
- highest_column = lo_worksheet->get_highest_column( ).
- count = 1.
- WHILE count <= highest_column.
- col_alpha = zcl_excel_common=>convert_column2alpha( ip_column = count ).
- lo_column = lo_worksheet->get_column( ip_column = col_alpha ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- count = count + 1.
- ENDWHILE.
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel11.prog.xml b/src/demos/zdemo_excel11.prog.xml
deleted file mode 100644
index 9044355..0000000
--- a/src/demos/zdemo_excel11.prog.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL11
- 1
- K
- E
- X
- X
-
-
- -
- I
- 00A
- Select by master data
- 132
-
- -
- I
- 00B
- Select by relationship
- 132
-
- -
- R
- abap2xlsx Demo: Export Organisation and Contact Persons
- 55
-
- -
- S
- COUNTRY
- .
- 19
- D
-
- -
- S
- MAXSEL
- .
- 27
- D
-
- -
- S
- MD
- Select by master data
- 29
-
- -
- S
- PARTNER
- .
- 24
- D
-
- -
- S
- PARTNERC
- .
- 19
- D
-
- -
- S
- POSTLCOD
- .
- 19
- D
-
- -
- S
- P_PATH
- .
- 21
- D
-
- -
- S
- REL
- Select by relationship
- 30
-
- -
- S
- RELTYP
- .
- 25
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel12.prog.abap b/src/demos/zdemo_excel12.prog.abap
deleted file mode 100644
index 541234a..0000000
--- a/src/demos/zdemo_excel12.prog.abap
+++ /dev/null
@@ -1,108 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL12
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel12.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '12_HideSizeOutlineRowsAndColumns.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Sheet1' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world in AutoSize column' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Hello world in a column width size 50' ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Hello world (hidden column)' ).
- lo_worksheet->set_cell( ip_column = 'F' ip_row = 2 ip_value = 'Outline column level 0' ).
- lo_worksheet->set_cell( ip_column = 'G' ip_row = 2 ip_value = 'Outline column level 1' ).
- lo_worksheet->set_cell( ip_column = 'H' ip_row = 2 ip_value = 'Outline column level 2' ).
- lo_worksheet->set_cell( ip_column = 'I' ip_row = 2 ip_value = 'Small' ).
-
-
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Hello world (hidden row)' ).
- lo_worksheet->set_cell( ip_column = 'E' ip_row = 5 ip_value = 'Hello world in a row height size 20' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'Simple outline rows 10-16 ( collapsed )' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 19 ip_value = '3 Outlines - Outlinelevel 1 is collapsed' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 19 ip_value = 'One of the two inner outlines is expanded, one collapsed' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 20 ip_value = 'Inner outline level - expanded' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 24 ip_value = 'Inner outline level - lines 25-28 are collapsed' ).
-
- lo_worksheet->zif_excel_sheet_properties~summarybelow = zif_excel_sheet_properties=>c_below_off. " By default is on
- lo_worksheet->zif_excel_sheet_properties~summaryright = zif_excel_sheet_properties=>c_right_off. " By default is on
-
- " Column Settings
- " Auto size
- lo_column = lo_worksheet->get_column( ip_column = 'B' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( ip_column = 'I' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- " Manual Width
- lo_column = lo_worksheet->get_column( ip_column = 'C' ).
- lo_column->set_width( ip_width = 50 ).
- lo_column = lo_worksheet->get_column( ip_column = 'D' ).
- lo_column->set_visible( ip_visible = abap_false ).
- " Implementation in the Writer is not working yet ===== TODO =====
- lo_column = lo_worksheet->get_column( ip_column = 'F' ).
- lo_column->set_outline_level( ip_outline_level = 0 ).
- lo_column = lo_worksheet->get_column( ip_column = 'G' ).
- lo_column->set_outline_level( ip_outline_level = 1 ).
- lo_column = lo_worksheet->get_column( ip_column = 'H' ).
- lo_column->set_outline_level( ip_outline_level = 2 ).
-
- lo_row = lo_worksheet->get_row( ip_row = 1 ).
- lo_row->set_visible( ip_visible = abap_false ).
- lo_row = lo_worksheet->get_row( ip_row = 5 ).
- lo_row->set_row_height( ip_row_height = 20 ).
-
-* Define an outline rows 10-16, collapsed on startup
- lo_worksheet->set_row_outline( iv_row_from = 10
- iv_row_to = 16
- iv_collapsed = abap_true ). " collapsed
-
-* Define an inner outline rows 21-22, expanded when outer outline becomes extended
- lo_worksheet->set_row_outline( iv_row_from = 21
- iv_row_to = 22
- iv_collapsed = abap_false ). " expanded
-
-* Define an inner outline rows 25-28, collapsed on startup
- lo_worksheet->set_row_outline( iv_row_from = 25
- iv_row_to = 28
- iv_collapsed = abap_true ). " collapsed
-
-* Define an outer outline rows 20-30, collapsed on startup
- lo_worksheet->set_row_outline( iv_row_from = 20
- iv_row_to = 30
- iv_collapsed = abap_true ). " collapsed
-
-* Hint: the order you create the outlines can be arbitrary
-* You can start with inner outlines or with outer outlines
-
-*--------------------------------------------------------------------*
-* Hide columns right of column M
-*--------------------------------------------------------------------*
- lo_worksheet->zif_excel_sheet_properties~hide_columns_from = 'M'.
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel12.prog.xml b/src/demos/zdemo_excel12.prog.xml
deleted file mode 100644
index b11456f..0000000
--- a/src/demos/zdemo_excel12.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL12
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Hide Columns
- 29
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel13.prog.abap b/src/demos/zdemo_excel13.prog.abap
deleted file mode 100644
index 514191d..0000000
--- a/src/demos/zdemo_excel13.prog.abap
+++ /dev/null
@@ -1,87 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL13
-*&
-*&---------------------------------------------------------------------*
-*& Example by: Alvaro "Blag" Tejada Galindo.
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel13.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lv_style_bold_border_guid TYPE zexcel_cell_style,
- lo_style_bold_border TYPE REF TO zcl_excel_style,
- lo_border_dark TYPE REF TO zcl_excel_style_border.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '13_MergedCells.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'sheet1' ).
-
- CREATE OBJECT lo_border_dark.
- lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
- lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
-
- lo_style_bold_border = lo_excel->add_new_style( ).
- lo_style_bold_border->font->bold = abap_true.
- lo_style_bold_border->font->italic = abap_false.
- lo_style_bold_border->font->color-rgb = zcl_excel_style_color=>c_black.
- lo_style_bold_border->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_bold_border->borders->allborders = lo_border_dark.
- lv_style_bold_border_guid = lo_style_bold_border->get_guid( ).
-
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'A' ip_value = 'Test' ).
-
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'B' ip_value = 'Banana' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'C' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'D' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'E' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'F' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'G' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'B' ip_value = 'Apple' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'D' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'E' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'F' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'G' ip_value = '' ip_style = lv_style_bold_border_guid ).
-
- lo_worksheet->set_merge( ip_row = 4 ip_column_start = 'B' ip_column_end = 'G' ).
-
- " Test also if merge works when oher merged chells are empty
- lo_worksheet->set_merge( ip_range = 'B6:G6' ip_value = 'Tomato' ).
-
- " Test the patch provided by Victor Alekhin to merge cells in one column
- lo_worksheet->set_merge( ip_range = 'B8:G10' ip_value = 'Merge cells also over multiple rows by Victor Alekhin' ).
-
- " Test the patch provided by Alexander Budeyev with different column merges
- lo_worksheet->set_cell( ip_row = 12 ip_column = 'B' ip_value = 'Merge cells with different merges by Alexander Budeyev' ).
- lo_worksheet->set_cell( ip_row = 13 ip_column = 'B' ip_value = 'Test' ).
-
- lo_worksheet->set_cell( ip_row = 13 ip_column = 'D' ip_value = 'Banana' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 14 ip_column = 'D' ip_value = '' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 13 ip_column = 'E' ip_value = 'Apple' ip_style = lv_style_bold_border_guid ).
- lo_worksheet->set_cell( ip_row = 13 ip_column = 'F' ip_value = '' ip_style = lv_style_bold_border_guid ).
-
- " Test merge (issue)
- lo_worksheet->set_merge( ip_row = 13 ip_column_start = 'B' ip_column_end = 'C' ip_row_to = 15 ).
- lo_worksheet->set_merge( ip_row = 13 ip_column_start = 'D' ip_column_end = 'D' ip_row_to = 14 ).
- lo_worksheet->set_merge( ip_row = 13 ip_column_start = 'E' ip_column_end = 'F' ).
-
- " Test area with merge
- lo_worksheet->set_area( ip_row = 18 ip_row_to = 19 ip_column_start = 'B' ip_column_end = 'G' ip_style = lv_style_bold_border_guid
- ip_value = 'Merge cells with new area method by Helmut Bohr ' ip_merge = abap_true ).
-
- " Test area without merge
- lo_worksheet->set_area( ip_row = 21 ip_row_to = 22 ip_column_start = 'B' ip_column_end = 'G' ip_style = lv_style_bold_border_guid
- ip_value = 'Test area' ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel13.prog.xml b/src/demos/zdemo_excel13.prog.xml
deleted file mode 100644
index 985825a..0000000
--- a/src/demos/zdemo_excel13.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL13
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Merge cells
- 28
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel14.prog.abap b/src/demos/zdemo_excel14.prog.abap
deleted file mode 100644
index 2e746c2..0000000
--- a/src/demos/zdemo_excel14.prog.abap
+++ /dev/null
@@ -1,160 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL14
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel14.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_center TYPE REF TO zcl_excel_style,
- lo_style_right TYPE REF TO zcl_excel_style,
- lo_style_left TYPE REF TO zcl_excel_style,
- lo_style_general TYPE REF TO zcl_excel_style,
- lo_style_bottom TYPE REF TO zcl_excel_style,
- lo_style_middle TYPE REF TO zcl_excel_style,
- lo_style_top TYPE REF TO zcl_excel_style,
- lo_style_justify TYPE REF TO zcl_excel_style,
- lo_style_mixed TYPE REF TO zcl_excel_style,
- lo_style_mixed_wrap TYPE REF TO zcl_excel_style,
- lo_style_rotated TYPE REF TO zcl_excel_style,
- lo_style_shrink TYPE REF TO zcl_excel_style,
- lo_style_indent TYPE REF TO zcl_excel_style,
- lv_style_center_guid TYPE zexcel_cell_style,
- lv_style_right_guid TYPE zexcel_cell_style,
- lv_style_left_guid TYPE zexcel_cell_style,
- lv_style_general_guid TYPE zexcel_cell_style,
- lv_style_bottom_guid TYPE zexcel_cell_style,
- lv_style_middle_guid TYPE zexcel_cell_style,
- lv_style_top_guid TYPE zexcel_cell_style,
- lv_style_justify_guid TYPE zexcel_cell_style,
- lv_style_mixed_guid TYPE zexcel_cell_style,
- lv_style_mixed_wrap_guid TYPE zexcel_cell_style,
- lv_style_rotated_guid TYPE zexcel_cell_style,
- lv_style_shrink_guid TYPE zexcel_cell_style,
- lv_style_indent_guid TYPE zexcel_cell_style.
-
-DATA: lo_row TYPE REF TO zcl_excel_row.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '14_Alignment.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'sheet1' ).
-
- "Center
- lo_style_center = lo_excel->add_new_style( ).
- lo_style_center->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lv_style_center_guid = lo_style_center->get_guid( ).
- "Right
- lo_style_right = lo_excel->add_new_style( ).
- lo_style_right->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_right.
- lv_style_right_guid = lo_style_right->get_guid( ).
- "Left
- lo_style_left = lo_excel->add_new_style( ).
- lo_style_left->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_left.
- lv_style_left_guid = lo_style_left->get_guid( ).
- "General
- lo_style_general = lo_excel->add_new_style( ).
- lo_style_general->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_general.
- lv_style_general_guid = lo_style_general->get_guid( ).
- "Bottom
- lo_style_bottom = lo_excel->add_new_style( ).
- lo_style_bottom->alignment->vertical = zcl_excel_style_alignment=>c_vertical_bottom.
- lv_style_bottom_guid = lo_style_bottom->get_guid( ).
- "Middle
- lo_style_middle = lo_excel->add_new_style( ).
- lo_style_middle->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lv_style_middle_guid = lo_style_middle->get_guid( ).
- "Top
- lo_style_top = lo_excel->add_new_style( ).
- lo_style_top->alignment->vertical = zcl_excel_style_alignment=>c_vertical_top.
- lv_style_top_guid = lo_style_top->get_guid( ).
- "Justify
- lo_style_justify = lo_excel->add_new_style( ).
- lo_style_justify->alignment->vertical = zcl_excel_style_alignment=>c_vertical_justify.
- lv_style_justify_guid = lo_style_justify->get_guid( ).
-
- "Shrink
- lo_style_shrink = lo_excel->add_new_style( ).
- lo_style_shrink->alignment->shrinktofit = abap_true.
- lv_style_shrink_guid = lo_style_shrink->get_guid( ).
-
- "Indent
- lo_style_indent = lo_excel->add_new_style( ).
- lo_style_indent->alignment->indent = 5.
- lv_style_indent_guid = lo_style_indent->get_guid( ).
-
- "Middle / Centered / Wrap
- lo_style_mixed_wrap = lo_excel->add_new_style( ).
- lo_style_mixed_wrap->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_mixed_wrap->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lo_style_mixed_wrap->alignment->wraptext = abap_true.
- lv_style_mixed_wrap_guid = lo_style_mixed_wrap->get_guid( ).
-
- "Middle / Centered / Wrap
- lo_style_mixed = lo_excel->add_new_style( ).
- lo_style_mixed->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_mixed->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lv_style_mixed_guid = lo_style_mixed->get_guid( ).
-
- "Center
- lo_style_rotated = lo_excel->add_new_style( ).
- lo_style_rotated->alignment->horizontal = zcl_excel_style_alignment=>c_horizontal_center.
- lo_style_rotated->alignment->vertical = zcl_excel_style_alignment=>c_vertical_center.
- lo_style_rotated->alignment->textrotation = 165. " -75° == 90° + 75°
- lv_style_rotated_guid = lo_style_rotated->get_guid( ).
-
-
- " Set row size for first 7 rows to 40
- DO 7 TIMES.
- lo_row = lo_worksheet->get_row( sy-index ).
- lo_row->set_row_height( 40 ).
- ENDDO.
-
- "Horizontal alignment
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'B' ip_value = 'Centered Text' ip_style = lv_style_center_guid ).
- lo_worksheet->set_cell( ip_row = 5 ip_column = 'B' ip_value = 'Right Text' ip_style = lv_style_right_guid ).
- lo_worksheet->set_cell( ip_row = 6 ip_column = 'B' ip_value = 'Left Text' ip_style = lv_style_left_guid ).
- lo_worksheet->set_cell( ip_row = 7 ip_column = 'B' ip_value = 'General Text' ip_style = lv_style_general_guid ).
-
- " Shrink & indent
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'F' ip_value = 'Text shrinked' ip_style = lv_style_shrink_guid ).
- lo_worksheet->set_cell( ip_row = 5 ip_column = 'F' ip_value = 'Text indented' ip_style = lv_style_indent_guid ).
-
- "Vertical alignment
-
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'D' ip_value = 'Bottom Text' ip_style = lv_style_bottom_guid ).
- lo_worksheet->set_cell( ip_row = 5 ip_column = 'D' ip_value = 'Middle Text' ip_style = lv_style_middle_guid ).
- lo_worksheet->set_cell( ip_row = 6 ip_column = 'D' ip_value = 'Top Text' ip_style = lv_style_top_guid ).
- lo_worksheet->set_cell( ip_row = 7 ip_column = 'D' ip_value = 'Justify Text' ip_style = lv_style_justify_guid ).
-
- " Wrapped
- lo_worksheet->set_cell( ip_row = 10 ip_column = 'B'
- ip_value = 'This is a wrapped text centered in the middle'
- ip_style = lv_style_mixed_wrap_guid ).
-
- " Rotated
- lo_worksheet->set_cell( ip_row = 10 ip_column = 'D'
- ip_value = 'This is a centered text rotated by -75°'
- ip_style = lv_style_rotated_guid ).
-
- " forced line break
- DATA: lv_value TYPE string.
- CONCATENATE 'This is a wrapped text centered in the middle' cl_abap_char_utilities=>cr_lf
- 'and a manuall line break.' INTO lv_value.
- lo_worksheet->set_cell( ip_row = 11 ip_column = 'B'
- ip_value = lv_value
- ip_style = lv_style_mixed_guid ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel14.prog.xml b/src/demos/zdemo_excel14.prog.xml
deleted file mode 100644
index 8a72156..0000000
--- a/src/demos/zdemo_excel14.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL14
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Alignment
- 26
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel15.prog.abap b/src/demos/zdemo_excel15.prog.abap
deleted file mode 100644
index 1772aa2..0000000
--- a/src/demos/zdemo_excel15.prog.abap
+++ /dev/null
@@ -1,162 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL15
-*&
-*&---------------------------------------------------------------------*
-*& 2010-10-30, Gregor Wolf:
-*& Added the functionality to ouput the read table content
-*& 2011-12-19, Shahrin Shahrulzaman:
-*& Added the functionality to have multiple input and output files
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel15.
-
-TYPES:
- BEGIN OF t_demo_excel15,
- input TYPE string,
- END OF t_demo_excel15.
-
-CONSTANTS: sheet_with_date_formats TYPE string VALUE '24_Sheets_with_different_default_date_formats.xlsx'.
-
-DATA: excel TYPE REF TO zcl_excel,
- lo_excel_writer TYPE REF TO zif_excel_writer,
- reader TYPE REF TO zif_excel_reader.
-
-DATA: ex TYPE REF TO zcx_excel,
- msg TYPE string.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_workdir TYPE string,
- output_file_path TYPE string,
- input_file_path TYPE string,
- lv_file_separator TYPE c.
-
-DATA: worksheet TYPE REF TO zcl_excel_worksheet,
- highest_column TYPE zexcel_cell_column,
- highest_row TYPE int4,
- column TYPE zexcel_cell_column VALUE 1,
- col_str TYPE zexcel_cell_column_alpha,
- row TYPE int4 VALUE 1,
- value TYPE zexcel_cell_value,
- converted_date TYPE d.
-
-DATA:
- lt_files TYPE TABLE OF t_demo_excel15.
-FIELD-SYMBOLS: TYPE t_demo_excel15.
-
-PARAMETERS: p_path TYPE zexcel_export_dir,
- p_noout TYPE abap_bool DEFAULT abap_true.
-
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
- lv_workdir = p_path.
- cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
- CHANGING selected_folder = lv_workdir ).
- p_path = lv_workdir.
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
-
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '01_HelloWorld.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '02_Styles.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '03_iTab.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '04_Sheets.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '05_Conditional.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '07_ConditionalAll.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '08_Range.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '13_MergedCells.xlsx'.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = sheet_with_date_formats.
- APPEND INITIAL LINE TO lt_files ASSIGNING .
- -input = '31_AutosizeWithDifferentFontSizes.xlsx'.
-
-START-OF-SELECTION.
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
-
- LOOP AT lt_files ASSIGNING .
- CONCATENATE p_path lv_file_separator -input INTO input_file_path.
- CONCATENATE p_path lv_file_separator '15_' -input INTO output_file_path.
- REPLACE '.xlsx' IN output_file_path WITH 'FromReader.xlsx'.
-
- TRY.
- CREATE OBJECT reader TYPE zcl_excel_reader_2007.
- excel = reader->load_file( input_file_path ).
-
- IF p_noout EQ abap_false.
- worksheet = excel->get_active_worksheet( ).
- highest_column = worksheet->get_highest_column( ).
- highest_row = worksheet->get_highest_row( ).
-
- WRITE: / 'Filename ', -input.
- WRITE: / 'Highest column: ', highest_column, 'Highest row: ', highest_row.
- WRITE: /.
-
- WHILE row <= highest_row.
- WHILE column <= highest_column.
- col_str = zcl_excel_common=>convert_column2alpha( column ).
- worksheet->get_cell(
- EXPORTING
- ip_column = col_str
- ip_row = row
- IMPORTING
- ep_value = value
- ).
- WRITE: value.
- column = column + 1.
- ENDWHILE.
- WRITE: /.
- column = 1.
- row = row + 1.
- ENDWHILE.
- IF -input = sheet_with_date_formats.
- worksheet->get_cell(
- EXPORTING
- ip_columnrow = 'A4'
- IMPORTING
- ep_value = value
- ).
- WRITE: / 'Date value using get_cell: ', value.
- converted_date = zcl_excel_common=>excel_string_to_date( ip_value = value ).
- WRITE: / 'Converted date: ', converted_date.
- ENDIF.
- ENDIF.
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
- lv_file = lo_excel_writer->write_file( excel ).
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = output_file_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
-
-
- CATCH zcx_excel INTO ex. " Exceptions for ABAP2XLSX
- msg = ex->get_text( ).
- WRITE: / msg.
- ENDTRY.
- ENDLOOP.
diff --git a/src/demos/zdemo_excel15.prog.xml b/src/demos/zdemo_excel15.prog.xml
deleted file mode 100644
index 298e453..0000000
--- a/src/demos/zdemo_excel15.prog.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL15
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Reader
- 22
-
- -
- S
- P_NOOUT
- Hide output
- 19
-
- -
- S
- P_PATH
- .
- 24
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel16.prog.abap b/src/demos/zdemo_excel16.prog.abap
deleted file mode 100644
index 15368b5..0000000
--- a/src/demos/zdemo_excel16.prog.abap
+++ /dev/null
@@ -1,131 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL16
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel16.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_drawing TYPE REF TO zcl_excel_drawing.
-
-
-DATA: ls_io TYPE skwf_io.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '16_Drawings.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-PARAMETERS: p_objid TYPE sdok_docid DEFAULT '456694429165174BE10000000A1550C0', " Question mark in standard Web Dynpro WDT_QUIZ
- p_class TYPE sdok_class DEFAULT 'M_IMAGE_P',
- pobjtype TYPE skwf_ioty DEFAULT 'P'.
-
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- "Load samle image
- DATA: lt_bin TYPE solix_tab,
- lv_len TYPE i,
- lv_content TYPE xstring,
- ls_key TYPE wwwdatatab.
-
- CALL METHOD cl_gui_frontend_services=>gui_upload
- EXPORTING
- filename = 'c:\Program Files\SAP\FrontEnd\SAPgui\wwi\graphics\W_bio.bmp'
- filetype = 'BIN'
- IMPORTING
- filelength = lv_len
- CHANGING
- data_tab = lt_bin
- EXCEPTIONS
- file_open_error = 1
- file_read_error = 2
- no_batch = 3
- gui_refuse_filetransfer = 4
- invalid_type = 5
- no_authority = 6
- unknown_error = 7
- bad_data_format = 8
- header_not_allowed = 9
- separator_not_allowed = 10
- header_too_long = 11
- unknown_dp_error = 12
- access_denied = 13
- dp_out_of_memory = 14
- disk_full = 15
- dp_timeout = 16
- not_supported_by_gui = 17
- error_no_gui = 18
- OTHERS = 19.
- IF sy-subrc <> 0.
- ENDIF.
-
- CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
- EXPORTING
- input_length = lv_len
- IMPORTING
- buffer = lv_content
- TABLES
- binary_tab = lt_bin
- EXCEPTIONS
- failed = 1
- OTHERS = 2.
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Sheet1' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Image from web repository (SMW0)' ).
-
- " create global drawing, set position and media from web repository
- lo_drawing = lo_excel->add_new_drawing( ).
- lo_drawing->set_position( ip_from_row = 3
- ip_from_col = 'B' ).
-
- ls_key-relid = 'MI'.
- ls_key-objid = 'SAPLOGO.GIF'.
- lo_drawing->set_media_www( ip_key = ls_key
- ip_width = 166
- ip_height = 75 ).
-
- " assign drawing to the worksheet
- lo_worksheet->add_drawing( lo_drawing ).
-
- " another drawing from a XSTRING read from a file
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 8 ip_value = 'Image from a file (c:\Program Files\SAP\FrontEnd\SAPgui\wwi\graphics\W_bio.bmp)' ).
- lo_drawing = lo_excel->add_new_drawing( ).
- lo_drawing->set_position( ip_from_row = 9
- ip_from_col = 'B' ).
- lo_drawing->set_media( ip_media = lv_content
- ip_media_type = zcl_excel_drawing=>c_media_type_bmp
- ip_width = 83
- ip_height = 160 ).
-
- lo_worksheet->add_drawing( lo_drawing ).
-
- ls_io-objid = p_objid.
- ls_io-class = p_class.
- ls_io-objtype = pobjtype.
- IF ls_io IS NOT INITIAL.
- " another drawing from a XSTRING read from a file
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 18 ip_value = 'Mime repository (by default Question mark in standard Web Dynpro WDT_QUIZ)' ).
- lo_drawing = lo_excel->add_new_drawing( ).
- lo_drawing->set_position( ip_from_row = 19
- ip_from_col = 'B' ).
- lo_drawing->set_media_mime( ip_io = ls_io
- ip_width = 126
- ip_height = 145 ).
-
- lo_worksheet->add_drawing( lo_drawing ).
- ENDIF.
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel16.prog.xml b/src/demos/zdemo_excel16.prog.xml
deleted file mode 100644
index e67de39..0000000
--- a/src/demos/zdemo_excel16.prog.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL16
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Drawings
- 25
-
- -
- S
- POBJTYPE
- .
- 9
- D
-
- -
- S
- P_CLASS
- .
- 9
- D
-
- -
- S
- P_OBJID
- .
- 9
- D
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel17.prog.abap b/src/demos/zdemo_excel17.prog.abap
deleted file mode 100644
index 78faf87..0000000
--- a/src/demos/zdemo_excel17.prog.abap
+++ /dev/null
@@ -1,53 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL17
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel17.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_protection TYPE REF TO zcl_excel_style,
- lv_style_protection_guid TYPE zexcel_cell_style,
- lo_style TYPE REF TO zcl_excel_style,
- lv_style TYPE zexcel_cell_style.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '17_SheetProtection.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-PARAMETERS: p_pwd TYPE zexcel_aes_password LOWER CASE DEFAULT 'secret'.
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
-* lo_worksheet->zif_excel_sheet_protection~password = 'DAA7'. "it is the encoded word "secret"
- lo_worksheet->zif_excel_sheet_protection~password = zcl_excel_common=>encrypt_password( p_pwd ).
- lo_worksheet->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_active.
- lo_worksheet->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_active.
- lo_worksheet->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_active.
- " First style to unlock a cell
- lo_style_protection = lo_excel->add_new_style( ).
- lo_style_protection->protection->locked = zcl_excel_style_protection=>c_protection_unlocked.
- lv_style_protection_guid = lo_style_protection->get_guid( ).
- " Another style which should not affect the unlock style
- lo_style = lo_excel->add_new_style( ).
- lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style->fill->fgcolor-rgb = 'FFCC3333'.
- lv_style = lo_style->get_guid( ).
- lo_worksheet->set_cell( ip_row = 3 ip_column = 'C' ip_value = 'This cell is locked locked and has the second formating' ip_style = lv_style ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
- lo_worksheet->set_cell( ip_row = 5 ip_column = 'C' ip_value = 'This cell is locked as all the others empty cell' ).
- lo_worksheet->set_cell( ip_row = 6 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
- lo_worksheet->set_cell( ip_row = 7 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
- lo_worksheet->set_cell( ip_row = 8 ip_column = 'C' ip_value = 'This cell is locked as all the others empty cell' ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel17.prog.xml b/src/demos/zdemo_excel17.prog.xml
deleted file mode 100644
index 8968a64..0000000
--- a/src/demos/zdemo_excel17.prog.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL17
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Sheet Protection
- 33
-
- -
- S
- P_PATH
- .
- 24
- D
-
- -
- S
- P_PWD
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel18.prog.abap b/src/demos/zdemo_excel18.prog.abap
deleted file mode 100644
index 4feafa9..0000000
--- a/src/demos/zdemo_excel18.prog.abap
+++ /dev/null
@@ -1,34 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL18
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel18.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lv_style_protection_guid TYPE zexcel_cell_style.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '18_BookProtection.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_excel->zif_excel_book_protection~protected = zif_excel_book_protection=>c_protected.
- lo_excel->zif_excel_book_protection~lockrevision = zif_excel_book_protection=>c_locked.
- lo_excel->zif_excel_book_protection~lockstructure = zif_excel_book_protection=>c_locked.
- lo_excel->zif_excel_book_protection~lockwindows = zif_excel_book_protection=>c_locked.
-
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel18.prog.xml b/src/demos/zdemo_excel18.prog.xml
deleted file mode 100644
index 5a3c58c..0000000
--- a/src/demos/zdemo_excel18.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL18
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Book protection
- 32
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel19.prog.abap b/src/demos/zdemo_excel19.prog.abap
deleted file mode 100644
index 523c6ed..0000000
--- a/src/demos/zdemo_excel19.prog.abap
+++ /dev/null
@@ -1,53 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL19
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel19.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '19_SetActiveSheet.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-PARAMETERS: p_noout TYPE abap_bool DEFAULT abap_true.
-
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
-
- " First Worksheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'First' ).
- lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 1' ).
-
- " Second Worksheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( 'Second' ).
- lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 2' ).
-
- " Third Worksheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( 'Third' ).
- lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 3' ).
-
- IF p_noout EQ abap_false.
- DATA: active_sheet_index TYPE zexcel_active_worksheet.
- active_sheet_index = lo_excel->get_active_sheet_index( ).
- WRITE: 'Sheet Index before: ', active_sheet_index.
- ENDIF.
- lo_excel->set_active_sheet_index( '2' ).
- IF p_noout EQ abap_false.
- active_sheet_index = lo_excel->get_active_sheet_index( ).
- WRITE: 'Sheet Index after: ', active_sheet_index.
- ENDIF.
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel19.prog.xml b/src/demos/zdemo_excel19.prog.xml
deleted file mode 100644
index cadc1bf..0000000
--- a/src/demos/zdemo_excel19.prog.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL19
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Set active sheet
- 33
-
- -
- S
- P_NOOUT
- Hide output
- 19
-
- -
- S
- P_PATH
- .
- 26
- D
-
-
-
- -
- D
-
-
-
- S
- P_NOOUT
- Hide output
- 19
-
- -
- S
- P_PATH
- .
- 26
- D
-
-
-
-
-
-
-
diff --git a/src/demos/zdemo_excel2.prog.abap b/src/demos/zdemo_excel2.prog.abap
deleted file mode 100644
index f0a1f2d..0000000
--- a/src/demos/zdemo_excel2.prog.abap
+++ /dev/null
@@ -1,224 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL2
-*& Test Styles for ABAP2XLSX
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel2.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_bold TYPE REF TO zcl_excel_style,
- lo_style_underline TYPE REF TO zcl_excel_style,
- lo_style_filled TYPE REF TO zcl_excel_style,
- lo_style_filled_green TYPE REF TO zcl_excel_style,
- lo_style_filled_turquoise TYPE REF TO zcl_excel_style,
- lo_style_border TYPE REF TO zcl_excel_style,
- lo_style_button TYPE REF TO zcl_excel_style,
- lo_border_dark TYPE REF TO zcl_excel_style_border,
- lo_border_light TYPE REF TO zcl_excel_style_border,
- lo_style_gr_cornerlb TYPE REF TO zcl_excel_style,
- lo_style_gr_cornerlt TYPE REF TO zcl_excel_style,
- lo_style_gr_cornerrb TYPE REF TO zcl_excel_style,
- lo_style_gr_cornerrt TYPE REF TO zcl_excel_style,
- lo_style_gr_horizontal90 TYPE REF TO zcl_excel_style,
- lo_style_gr_horizontal270 TYPE REF TO zcl_excel_style,
- lo_style_gr_horizontalb TYPE REF TO zcl_excel_style,
- lo_style_gr_vertical TYPE REF TO zcl_excel_style,
- lo_style_gr_vertical2 TYPE REF TO zcl_excel_style,
- lo_style_gr_fromcenter TYPE REF TO zcl_excel_style,
- lo_style_gr_diagonal45 TYPE REF TO zcl_excel_style,
- lo_style_gr_diagonal45b TYPE REF TO zcl_excel_style,
- lo_style_gr_diagonal135 TYPE REF TO zcl_excel_style,
- lo_style_gr_diagonal135b TYPE REF TO zcl_excel_style.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-DATA: lo_row TYPE REF TO zcl_excel_row.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '02_Styles.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-
-START-OF-SELECTION.
-
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Create border object
- CREATE OBJECT lo_border_dark.
- lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
- lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
- CREATE OBJECT lo_border_light.
- lo_border_light->border_color-rgb = zcl_excel_style_color=>c_gray.
- lo_border_light->border_style = zcl_excel_style_border=>c_border_thin.
- " Create a bold / italic style
- lo_style_bold = lo_excel->add_new_style( ).
- lo_style_bold->font->bold = abap_true.
- lo_style_bold->font->italic = abap_true.
- lo_style_bold->font->name = zcl_excel_style_font=>c_name_arial.
- lo_style_bold->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_bold->font->color-rgb = zcl_excel_style_color=>c_red.
- " Create an underline double style
- lo_style_underline = lo_excel->add_new_style( ).
- lo_style_underline->font->underline = abap_true.
- lo_style_underline->font->underline_mode = zcl_excel_style_font=>c_underline_double.
- lo_style_underline->font->name = zcl_excel_style_font=>c_name_roman.
- lo_style_underline->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_underline->font->family = zcl_excel_style_font=>c_family_roman.
- " Create filled style yellow
- lo_style_filled = lo_excel->add_new_style( ).
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-theme = zcl_excel_style_color=>c_theme_accent6.
- " Create border with button effects
- lo_style_button = lo_excel->add_new_style( ).
- lo_style_button->borders->right = lo_border_dark.
- lo_style_button->borders->down = lo_border_dark.
- lo_style_button->borders->left = lo_border_light.
- lo_style_button->borders->top = lo_border_light.
- "Create style with border
- lo_style_border = lo_excel->add_new_style( ).
- lo_style_border->borders->allborders = lo_border_dark.
- lo_style_border->borders->diagonal = lo_border_dark.
- lo_style_border->borders->diagonal_mode = zcl_excel_style_borders=>c_diagonal_both.
- " Create filled style green
- lo_style_filled_green = lo_excel->add_new_style( ).
- lo_style_filled_green->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled_green->fill->fgcolor-rgb = zcl_excel_style_color=>c_green.
- lo_style_filled_green->font->name = zcl_excel_style_font=>c_name_cambria.
- lo_style_filled_green->font->scheme = zcl_excel_style_font=>c_scheme_major.
-
- " Create filled with gradients
- lo_style_gr_cornerlb = lo_excel->add_new_style( ).
- lo_style_gr_cornerlb->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerlb.
- lo_style_gr_cornerlb->fill->fgcolor-rgb = zcl_excel_style_color=>c_blue.
- lo_style_gr_cornerlb->fill->bgcolor-rgb = zcl_excel_style_color=>c_white.
- lo_style_gr_cornerlb->font->name = zcl_excel_style_font=>c_name_cambria.
- lo_style_gr_cornerlb->font->scheme = zcl_excel_style_font=>c_scheme_major.
-
- lo_style_gr_cornerlt = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_cornerlt->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerlt.
-
- lo_style_gr_cornerrb = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_cornerrb->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerrb.
-
- lo_style_gr_cornerrt = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_cornerrt->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_cornerrt.
-
- lo_style_gr_horizontal90 = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_horizontal90->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontal90.
-
- lo_style_gr_horizontal270 = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_horizontal270->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontal270.
-
- lo_style_gr_horizontalb = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_horizontalb->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_horizontalb.
-
- lo_style_gr_vertical = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_vertical->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_vertical.
-
- lo_style_gr_vertical2 = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_vertical2->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_vertical.
- lo_style_gr_vertical2->fill->fgcolor-rgb = zcl_excel_style_color=>c_white.
- lo_style_gr_vertical2->fill->bgcolor-rgb = zcl_excel_style_color=>c_blue.
-
- lo_style_gr_fromcenter = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_fromcenter->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_fromcenter.
-
- lo_style_gr_diagonal45 = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_diagonal45->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45.
-
- lo_style_gr_diagonal45b = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_diagonal45b->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45b.
-
- lo_style_gr_diagonal135 = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_diagonal135->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135.
-
- lo_style_gr_diagonal135b = lo_excel->add_new_style( io_clone_of = lo_style_gr_cornerlb ).
- lo_style_gr_diagonal135b->fill->filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135b.
-
-
-
- " Create filled style turquoise using legacy excel ver <= 2003 palette. (https://github.com/abap2xlsx/abap2xlsx/issues/92)
- lo_style_filled_turquoise = lo_excel->add_new_style( ).
- lo_excel->legacy_palette->set_color( "replace built-in color from palette with out custom RGB turquoise
- ip_index = 16
- ip_color = '0040E0D0' ).
-
- lo_style_filled_turquoise->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled_turquoise->fill->fgcolor-indexed = 16.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Styles' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Bold text' ip_style = lo_style_bold ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Underlined text' ip_style = lo_style_underline ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'Filled text' ip_style = lo_style_filled ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = 'Borders' ip_style = lo_style_border ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 7 ip_value = 'I''m not a button :)' ip_style = lo_style_button ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'Modified color for Excel 2003' ip_style = lo_style_filled_turquoise ).
- " Fill the cell and apply one style
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = 'Filled text' ip_style = lo_style_filled ).
- " Change the style
- lo_worksheet->set_cell_style( ip_column = 'B' ip_row = 6 ip_style = lo_style_filled_green ).
- " Add Style to an empty cell to test Fix for Issue
- "#44 Exception ZCX_EXCEL thrown when style is set for an empty cell
- " https://github.com/abap2xlsx/abap2xlsx/issues/44
- lo_worksheet->set_cell_style( ip_column = 'E' ip_row = 6 ip_style = lo_style_filled_green ).
-
-
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 10 ip_style = lo_style_gr_cornerlb ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerlb ).
- lo_row = lo_worksheet->get_row( ip_row = 10 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 11 ip_style = lo_style_gr_cornerlt ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerlt ).
- lo_row = lo_worksheet->get_row( ip_row = 11 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 12 ip_style = lo_style_gr_cornerrb ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerrb ).
- lo_row = lo_worksheet->get_row( ip_row = 12 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 13 ip_style = lo_style_gr_cornerrt ip_value = zcl_excel_style_fill=>c_fill_gradient_cornerrt ).
- lo_row = lo_worksheet->get_row( ip_row = 13 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 14 ip_style = lo_style_gr_horizontal90 ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontal90 ).
- lo_row = lo_worksheet->get_row( ip_row = 14 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 15 ip_style = lo_style_gr_horizontal270 ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontal270 ).
- lo_row = lo_worksheet->get_row( ip_row = 15 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 16 ip_style = lo_style_gr_horizontalb ip_value = zcl_excel_style_fill=>c_fill_gradient_horizontalb ).
- lo_row = lo_worksheet->get_row( ip_row = 16 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 17 ip_style = lo_style_gr_vertical ip_value = zcl_excel_style_fill=>c_fill_gradient_vertical ).
- lo_row = lo_worksheet->get_row( ip_row = 17 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 18 ip_style = lo_style_gr_vertical2 ip_value = zcl_excel_style_fill=>c_fill_gradient_vertical ).
- lo_row = lo_worksheet->get_row( ip_row = 18 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 19 ip_style = lo_style_gr_fromcenter ip_value = zcl_excel_style_fill=>c_fill_gradient_fromcenter ).
- lo_row = lo_worksheet->get_row( ip_row = 19 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 20 ip_style = lo_style_gr_diagonal45 ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal45 ).
- lo_row = lo_worksheet->get_row( ip_row = 20 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 21 ip_style = lo_style_gr_diagonal45b ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal45b ).
- lo_row = lo_worksheet->get_row( ip_row = 21 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 22 ip_style = lo_style_gr_diagonal135 ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal135 ).
- lo_row = lo_worksheet->get_row( ip_row = 22 ).
- lo_row->set_row_height( ip_row_height = 30 ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 23 ip_style = lo_style_gr_diagonal135b ip_value = zcl_excel_style_fill=>c_fill_gradient_diagonal135b ).
- lo_row = lo_worksheet->get_row( ip_row = 23 ).
- lo_row->set_row_height( ip_row_height = 30 ).
-
-
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel2.prog.xml b/src/demos/zdemo_excel2.prog.xml
deleted file mode 100644
index a36144e..0000000
--- a/src/demos/zdemo_excel2.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL2
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Styles
- 25
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel20.prog.abap b/src/demos/zdemo_excel20.prog.abap
deleted file mode 100644
index 255eca3..0000000
--- a/src/demos/zdemo_excel20.prog.abap
+++ /dev/null
@@ -1,193 +0,0 @@
-*--------------------------------------------------------------------*
-* REPORT ZDEMO_EXCEL20
-* Demo for method zcl_excel_worksheet-bind_alv:
-* export data from ALV (CL_GUI_ALV_GRID) object to excel
-*--------------------------------------------------------------------*
-REPORT zdemo_excel20.
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events DEFINITION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events DEFINITION.
- PUBLIC SECTION.
- METHODS:
- on_user_command FOR EVENT added_function OF cl_salv_events
- IMPORTING e_salv_function.
-ENDCLASS. "lcl_handle_events DEFINITION
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events IMPLEMENTATION.
- METHOD on_user_command.
- PERFORM user_command." using e_salv_function text-i08.
- ENDMETHOD. "on_user_command
-ENDCLASS. "lcl_handle_events IMPLEMENTATION
-
-*--------------------------------------------------------------------*
-* DATA DECLARATION
-*--------------------------------------------------------------------*
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_alv TYPE REF TO cl_gui_alv_grid,
- lo_salv TYPE REF TO cl_salv_table,
- gr_events TYPE REF TO lcl_handle_events,
- lr_events TYPE REF TO cl_salv_events_table,
- gt_sbook TYPE TABLE OF sbook,
- gt_listheader TYPE slis_t_listheader,
- wa_listheader LIKE LINE OF gt_listheader.
-
-DATA: l_path TYPE string, " local dir
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS:
- lv_default_file_name TYPE string VALUE '20_BindAlv.xlsx'.
-*--------------------------------------------------------------------*
-*START-OF-SELECTION
-*--------------------------------------------------------------------*
-
-START-OF-SELECTION.
-
-* get data
-* ------------------------------------------
-
- SELECT *
- INTO TABLE gt_sbook[]
- FROM sbook "#EC CI_NOWHERE
- UP TO 10 ROWS.
-
-* Display ALV
-* ------------------------------------------
-
- TRY.
- cl_salv_table=>factory(
- EXPORTING
- list_display = abap_false
- IMPORTING
- r_salv_table = lo_salv
- CHANGING
- t_table = gt_sbook[] ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- TRY.
- lo_salv->set_screen_status(
- EXPORTING
- report = sy-repid
- pfstatus = 'ALV_STATUS'
- set_functions = lo_salv->c_functions_all ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- lr_events = lo_salv->get_event( ).
- CREATE OBJECT gr_events.
- SET HANDLER gr_events->on_user_command FOR lr_events.
-
- lo_salv->display( ).
-
-
-*&---------------------------------------------------------------------*
-*& Form USER_COMMAND
-*&---------------------------------------------------------------------*
-* ALV user command
-*--------------------------------------------------------------------*
-FORM user_command .
- IF sy-ucomm = 'EXCEL'.
-
-* get save file path
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = l_path ).
- cl_gui_cfw=>flush( ).
- cl_gui_frontend_services=>directory_browse(
- EXPORTING initial_folder = l_path
- CHANGING selected_folder = l_path ).
-
- IF l_path IS INITIAL.
- cl_gui_frontend_services=>get_sapgui_workdir(
- CHANGING sapworkdir = lv_workdir ).
- l_path = lv_workdir.
- ENDIF.
-
- cl_gui_frontend_services=>get_file_separator(
- CHANGING file_separator = lv_file_separator ).
-
- CONCATENATE l_path lv_file_separator lv_default_file_name
- INTO l_path.
-
-* export file to save file path
-
- PERFORM export_to_excel.
-
- ENDIF.
-ENDFORM. " USER_COMMAND
-
-*--------------------------------------------------------------------*
-* FORM EXPORT_TO_EXCEL
-*--------------------------------------------------------------------*
-* This subroutine is principal demo session
-*--------------------------------------------------------------------*
-FORM export_to_excel.
-
-* create zcl_excel_worksheet object
-
- CREATE OBJECT lo_excel.
- lo_worksheet = lo_excel->get_active_worksheet( ).
-
-* get ALV object from screen
-
- CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
- IMPORTING
- e_grid = lo_alv.
-
-* build list header
-
- wa_listheader-typ = 'H'.
- wa_listheader-info = sy-title.
- APPEND wa_listheader TO gt_listheader.
-
- wa_listheader-typ = 'S'.
- wa_listheader-info = 'Created by: ABAP2XLSX Group'.
- APPEND wa_listheader TO gt_listheader.
-
- wa_listheader-typ = 'A'.
- wa_listheader-info =
- 'Project hosting at https://github.com/abap2xlsx'.
- APPEND wa_listheader TO gt_listheader.
-
-* write to excel using method Bin_ALV
-
- lo_worksheet->bind_alv_ole2(
- EXPORTING
-* I_DOCUMENT_URL = SPACE " excel template
-* I_XLS = 'X' " create in xls format?
- i_save_path = l_path
- io_alv = lo_alv
- it_listheader = gt_listheader
- i_top = 2
- i_left = 1
-* I_COLUMNS_HEADER = 'X'
-* I_COLUMNS_AUTOFIT = 'X'
-* I_FORMAT_COL_HEADER =
-* I_FORMAT_SUBTOTAL =
-* I_FORMAT_TOTAL =
- EXCEPTIONS
- miss_guide = 1
- ex_transfer_kkblo_error = 2
- fatal_error = 3
- inv_data_range = 4
- dim_mismatch_vkey = 5
- dim_mismatch_sema = 6
- error_in_sema = 7
- OTHERS = 8
- ).
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
-
-ENDFORM. "EXPORT_TO_EXCEL
diff --git a/src/demos/zdemo_excel20.prog.xml b/src/demos/zdemo_excel20.prog.xml
deleted file mode 100644
index 15e7cdc..0000000
--- a/src/demos/zdemo_excel20.prog.xml
+++ /dev/null
@@ -1,4711 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL20
- 1
- E
- X
- X
-
-
-
- 000010
- 000010
-
-
-
- ALV_STATUS
- D
- 000004
- 000004
- 0001
- Standard for General List Output
-
-
-
-
- %ML
- 001
- S
- Folder
- F
-
-
- %PC
- 001
- S
- ICON_EXPORT
- @49@
- Local File...
- L
-
-
- %PC
- 002
- S
- ICON_EXPORT
- @49@
- Local file...
- L
-
-
- %SC
- 001
- S
- ICON_SEARCH
- @13@
- Find
- N
-
-
- %SC+
- 001
- S
- ICON_SEARCH_NEXT
- @4E@
- Find Next
-
-
- %SC+
- 002
- S
- ICON_SEARCH_NEXT
- @4E@
- Find next
-
-
- %SL
- 001
- S
- ICON_MAIL
- @1S@
- Mail Recipient
- M
-
-
- %SL
- 002
- S
- ICON_MAIL
- @1S@
- Mail recipient
- M
-
-
- &ABC
- 001
- S
- ICON_ABC
- @DL@
- ABC Analysis
- A
-
-
- &ALL
- 001
- S
- ICON_SELECT_ALL
- @4B@
- Select All
- S
-
-
- &ALL
- 002
- S
- ICON_SELECT_ALL
- @4B@
- Select all
- S
-
-
- &AQW
- 001
- S
- ICON_WORD_PROCESSING
- @DK@
- Word Processing...
- W
-
-
- &AQW
- 002
- S
- ICON_WORD_PROCESSING
- @DK@
- Word processing...
- W
-
-
- &AUF
- 001
- S
- Define Totals Drilldown...
- S
-
-
- &AUF
- 002
- S
- Define Breakdown...
- D
-
-
- &AVE
- 001
- S
- Saving...
- S
-
-
- &AVE
- 002
- S
- ICON_ALV_VARIANT_SAVE
- @DN@
- Save Layout...
-
-
- &AVE
- 003
- S
- ICON_ALV_VARIANT_SAVE
- @DN@
- Save layout...
-
-
- &AVR
- 001
- S
- Mean Value
- M
-
-
- &AVR
- 002
- S
- Mean value
- M
-
-
- &CDF
- 001
- S
- Unfreeze Columns
- U
-
-
- &CDF
- 002
- S
- Unfreeze
- U
-
-
- &CFI
- 001
- S
- Freeze to Column
- F
-
-
- &CFI
- 002
- S
- Freeze to column
- F
-
-
- &COUNT
- 001
- S
- Count
- C
-
-
- &CRB
- 001
- S
- ICON_TOTAL_LEFT
- @0B@
- First Column
-
-
- &CRE
- 001
- S
- ICON_TOTAL_RIGHT
- @0C@
- Last Column
-
-
- &CRE
- 002
- S
- ICON_TOTAL_RIGHT
- @0C@
- Last column
-
-
- &CRL
- 001
- S
- ICON_COLUMN_LEFT
- @0D@
- Column Left
-
-
- &CRL
- 002
- S
- ICON_COLUMN_LEFT
- @0D@
- Column left
-
-
- &CRR
- 001
- S
- ICON_COLUMN_RIGHT
- @0E@
- Column Right
-
-
- &CRR
- 002
- S
- ICON_COLUMN_RIGHT
- @0E@
- Column right
-
-
- &DATA_SAVE
- 001
- S
- ICON_SYSTEM_SAVE
- @2L@
- Save
-
-
- &DAU
- 001
- S
- Automatic Separator
- T
-
-
- &DOF
- 001
- S
- Separator Always Off
- E
-
-
- &DON
- 001
- S
- Separator Always On
- R
-
-
- &EB9
- 001
- S
- ICON_TABLE_SETTINGS
- @36@
- Call Up Report...
- B
-
-
- &EB9
- 002
- S
- ICON_TABLE_SETTINGS
- @36@
- Call Report...
- B
-
-
- &EB9
- 003
- S
- ICON_TABLE_SETTINGS
- @36@
- Call Up Report
- C
-
-
- &ELP
- 001
- S
- ICON_SYSTEM_HELP
- @35@
- Help
-
-
- &ERW
- 001
- S
- Manage...
- M
-
-
- &ERW
- 002
- S
- Layout Management
- L
-
-
- &ETA
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Details
-
-
- &F03
- 001
- S
- Back
- B
-
-
- &F12
- 001
- S
- ICON_CANCEL
- @0W@
- Cancel
- A
-
-
- &F15
- 001
- S
- Exit
- X
-
-
- &F4
- 001
- S
- Possible Entries
-
-
- &GRAPH
- 001
- S
- ICON_GRAPHICS
- @0N@
- Graphic
- G
-
-
- &IC1
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Choose
-
-
- &ILD
- 001
- S
- ICON_FILTER_UNDO
- @GD@
- Delete Filter
- L
-
-
- &ILD
- 002
- S
- Delete Filter
- L
-
-
- &ILT
- 001
- S
- ICON_FILTER
- @4G@
- Set Filter
- F
-
-
- &ILT
- 002
- S
- ICON_FILTER
- @4G@
- Set filter
- F
-
-
- &INFO
- 001
- S
- ICON_INFORMATION
- @0S@
- Information
-
-
- &KOM
- 001
- S
- ICON_COLLAPSE
- @3T@
- Choose...
- C
-
-
- &LFO
- 001
- S
- List status...
- L
-
-
- &LFO
- 002
- S
- ICON_INFORMATION
- @0S@
- List Status
-
-
- &LFO
- 003
- S
- ICON_INFORMATION
- @0S@
- List status...
-
-
- &LIS
- 001
- S
- Basic List
- B
-
-
- &MAX
- 001
- S
- Maximum
- A
-
-
- &MIN
- 001
- S
- Minimum
- I
-
-
- &NFO
- 001
- S
- ICON_INFORMATION
- @0S@
- Selections...
- Selections
- E
-
-
- &NTE
- 001
- S
- ICON_REFRESH
- @42@
- Refresh
-
-
- &NTE
- 002
- S
- Refresh
-
-
- &OAD
- 001
- S
- Choose...
- H
-
-
- &OAD
- 002
- S
- ICON_ALV_VARIANT_CHOOSE
- @DM@
- Select Layout...
-
-
- &OAD
- 003
- S
- ICON_ALV_VARIANT_CHOOSE
- @DM@
- Select layout...
-
-
- &ODN
- 001
- S
- ICON_SORT_DOWN
- @3F@
- Sort in Descending Order
- O
-
-
- &ODN
- 002
- S
- ICON_SORT_DOWN
- @3F@
- Sort in descending order
- O
-
-
- &OL0
- 001
- S
- ICON_ALV_VARIANTS
- @LZ@
- Change Layout...
-
-
- &OL0
- 002
- S
- ICON_ALV_VARIANTS
- @LZ@
- Change layout...
-
-
- &OLX
- 001
- S
- ICON_VARIANTS
- @0R@
- Change...
- C
-
-
- &OMP
- 001
- S
- ICON_COLLAPSE
- @3T@
- Collapse
-
-
- &OPT
- 001
- S
- Optimize Width
- P
-
-
- &OPT
- 002
- S
- Optimize width
- P
-
-
- &OUP
- 001
- S
- ICON_SORT_UP
- @3E@
- Sort in Ascending Order
- I
-
-
- &REFRESH
- 001
- S
- ICON_REFRESH
- @42@
- Refresh
-
-
- &RNT
- 001
- S
- ICON_PRINT
- @0X@
- Print
- P
-
-
- &RNT_PREV
- 001
- S
- ICON_LAYOUT_CONTROL
- @3G@
- Print Preview
- R
-
-
- &RNT_PREV
- 002
- S
- ICON_LAYOUT_CONTROL
- @3G@
- Print preview
- R
-
-
- &SAL
- 001
- S
- ICON_DESELECT_ALL
- @4D@
- Deselect All
- D
-
-
- &SAL
- 002
- S
- ICON_DESELECT_ALL
- @4D@
- Deselect all
- D
-
-
- &SUM
- 001
- S
- ICON_INTERMEDIATE_SUM
- @5V@
- Subtotals...
- T
-
-
- &UMC
- 001
- S
- ICON_SUM
- @3Z@
- Total
- T
-
-
- &VEXCEL
- 001
- S
- ICON_XLS
- @J2@
- Microsoft Excel
- M
-
-
- &VGRID
- 001
- S
- SAP List Viewer
- S
-
-
- &VLOTUS
- 001
- S
- Lotus 1-2-3
- L
-
-
- &XINT
- 001
- S
- Additional Functions of SAP Query
- E
-
-
- &XML
- 001
- S
- XML Export
- X
-
-
- &XML
- 002
- S
- XML Export...
- X
-
-
- &XPA
- 001
- S
- ICON_EXPAND
- @3S@
- Expand
-
-
- &XXL
- 001
- S
- ICON_XXL
- @DJ@
- Spreadsheet...
- A
-
-
- EXCEL
- 001
- S
- ICON_XLV
- @J3@
- Excel
- Export to Excel
-
-
- P+
- 001
- S
- Next Page
-
-
- P+
- 002
- S
- Next page
-
-
- P++
- 001
- S
- Last Page
-
-
- P-
- 001
- S
- Previous Page
-
-
- P--
- 001
- S
- First Page
-
-
-
-
- 000001
- 01
- F
- &RNT_PREV
- 001
-
-
- 000001
- 02
- F
- &RNT
- 001
-
-
- 000001
- 03
- S
-
-
- 000001
- 04
- M
- 000002
-
-
- 000001
- 05
- M
- 000003
-
-
- 000001
- 06
- S
-
-
- 000001
- 07
- F
- &F15
- 001
-
-
- 000002
- 01
- F
- &AQW
- 001
-
-
- 000002
- 02
- F
- &XXL
- 001
-
-
- 000002
- 03
- F
- %PC
- 001
-
-
- 000002
- 04
- F
- &XINT
- 001
-
-
- 000003
- 01
- F
- %SL
- 001
-
-
- 000003
- 02
- F
- %ML
- 001
-
-
- 000004
- 01
- F
- &ALL
- 001
-
-
- 000004
- 02
- F
- &SAL
- 001
-
-
- 000004
- 03
- S
-
-
- 000004
- 04
- F
- &ILT
- 001
-
-
- 000004
- 05
- F
- &ILD
- 001
-
-
- 000004
- 06
- S
-
-
- 000004
- 07
- F
- &OUP
- 001
-
-
- 000004
- 08
- F
- &ODN
- 001
-
-
- 000004
- 09
- S
-
-
- 000004
- 10
- M
- 000005
-
-
- 000004
- 11
- F
- &SUM
- 001
-
-
- 000004
- 12
- S
-
-
- 000004
- 13
- F
- %SC
- 001
-
-
- 000004
- 14
- S
-
-
- 000004
- 15
- F
- &F12
- 001
-
-
- 000005
- 01
- F
- &UMC
- 001
-
-
- 000005
- 02
- F
- &AVR
- 001
-
-
- 000005
- 03
- F
- &MIN
- 001
-
-
- 000005
- 04
- F
- &MAX
- 001
-
-
- 000005
- 05
- F
- &COUNT
- 001
-
-
- 000006
- 01
- F
- &ABC
- 001
-
-
- 000006
- 02
- S
-
-
- 000006
- 03
- F
- &F03
- 001
-
-
- 000007
- 01
- F
- &VGRID
- 001
-
-
- 000007
- 02
- F
- &VEXCEL
- 001
-
-
- 000007
- 03
- F
- &VLOTUS
- 001
-
-
- 000007
- 04
- S
-
-
- 000007
- 05
- F
- &GRAPH
- 001
-
-
- 000008
- 01
- M
- 000009
-
-
- 000008
- 02
- M
- 000010
-
-
- 000008
- 03
- F
- &AUF
- 001
-
-
- 000009
- 01
- F
- &OLX
- 001
-
-
- 000009
- 02
- F
- &OAD
- 001
-
-
- 000009
- 03
- S
-
-
- 000009
- 04
- F
- &AVE
- 001
-
-
- 000009
- 05
- S
-
-
- 000009
- 06
- F
- &ERW
- 001
-
-
- 000010
- 01
- F
- &OPT
- 001
-
-
- 000010
- 02
- S
-
-
- 000010
- 03
- F
- &CFI
- 001
-
-
- 000010
- 04
- F
- &CDF
- 001
-
-
- 000011
- 01
- F
- &RNT
- 001
-
-
- 000011
- 02
- M
- 000012
-
-
- 000011
- 03
- M
- 000013
-
-
- 000011
- 04
- S
-
-
- 000011
- 05
- F
- &F15
- 001
-
-
- 000012
- 01
- F
- &AQW
- 001
-
-
- 000012
- 02
- F
- &XXL
- 001
-
-
- 000012
- 03
- F
- %PC
- 001
-
-
- 000012
- 04
- F
- &XINT
- 001
-
-
- 000012
- 05
- F
- &XML
- 001
-
-
- 000013
- 01
- F
- %SL
- 001
-
-
- 000013
- 02
- F
- %ML
- 001
-
-
- 000014
- 01
- F
- &ALL
- 001
-
-
- 000014
- 02
- F
- &SAL
- 001
-
-
- 000014
- 03
- S
-
-
- 000014
- 04
- F
- &ILT
- 001
-
-
- 000014
- 05
- F
- &ILD
- 002
-
-
- 000014
- 06
- S
-
-
- 000014
- 07
- F
- &OUP
- 001
-
-
- 000014
- 08
- F
- &ODN
- 001
-
-
- 000014
- 09
- S
-
-
- 000014
- 10
- M
- 000015
-
-
- 000014
- 11
- F
- &SUM
- 001
-
-
- 000014
- 12
- S
-
-
- 000014
- 13
- F
- %SC
- 001
-
-
- 000014
- 14
- S
-
-
- 000014
- 15
- F
- &F12
- 001
-
-
- 000015
- 01
- F
- &UMC
- 001
-
-
- 000015
- 02
- F
- &AVR
- 001
-
-
- 000015
- 03
- F
- &MIN
- 001
-
-
- 000015
- 04
- F
- &MAX
- 001
-
-
- 000015
- 05
- F
- &COUNT
- 001
-
-
- 000016
- 01
- F
- &ABC
- 001
-
-
- 000016
- 02
- S
-
-
- 000016
- 03
- F
- &F03
- 001
-
-
- 000017
- 01
- F
- &LIS
- 001
-
-
- 000017
- 02
- S
-
-
- 000017
- 03
- M
- 000018
-
-
- 000017
- 04
- S
-
-
- 000017
- 05
- M
- 000019
-
-
- 000017
- 06
- S
-
-
- 000017
- 07
- M
- 000020
-
-
- 000017
- 08
- S
-
-
- 000017
- 09
- F
- &NFO
- 001
-
-
- 000017
- 10
- F
- &LFO
- 001
-
-
- 000018
- 01
- F
- &OLX
- 001
-
-
- 000018
- 02
- F
- &OAD
- 001
-
-
- 000018
- 03
- S
-
-
- 000018
- 04
- F
- &AVE
- 001
-
-
- 000018
- 05
- S
-
-
- 000018
- 06
- F
- &ERW
- 001
-
-
- 000019
- 01
- F
- &KOM
- 001
-
-
- 000019
- 02
- F
- &AUF
- 002
-
-
- 000020
- 01
- F
- &OPT
- 001
-
-
- 000020
- 02
- S
-
-
- 000020
- 03
- F
- &CFI
- 001
-
-
- 000020
- 04
- F
- &CDF
- 002
-
-
- 000020
- 05
- S
-
-
- 000020
- 06
- F
- &DAU
- 001
-
-
- 000020
- 07
- F
- &DON
- 001
-
-
- 000020
- 08
- F
- &DOF
- 001
-
-
- 000021
- 01
- F
- &RNT_PREV
- 001
-
-
- 000021
- 02
- F
- &RNT
- 001
-
-
- 000021
- 03
- S
-
-
- 000021
- 04
- M
- 000022
-
-
- 000021
- 05
- M
- 000023
-
-
- 000021
- 06
- S
-
-
- 000021
- 07
- F
- &F15
- 001
-
-
- 000022
- 01
- F
- &AQW
- 001
-
-
- 000022
- 02
- F
- &XXL
- 001
-
-
- 000022
- 03
- F
- %PC
- 001
-
-
- 000022
- 04
- F
- &XINT
- 001
-
-
- 000023
- 01
- F
- %SL
- 001
-
-
- 000023
- 02
- F
- %ML
- 001
-
-
- 000024
- 01
- F
- &ALL
- 001
-
-
- 000024
- 02
- F
- &SAL
- 001
-
-
- 000024
- 03
- S
-
-
- 000024
- 04
- F
- &ILT
- 001
-
-
- 000024
- 05
- F
- &ILD
- 001
-
-
- 000024
- 06
- S
-
-
- 000024
- 07
- F
- &OUP
- 001
-
-
- 000024
- 08
- F
- &ODN
- 001
-
-
- 000024
- 09
- S
-
-
- 000024
- 10
- M
- 000025
-
-
- 000024
- 11
- F
- &SUM
- 001
-
-
- 000024
- 12
- S
-
-
- 000024
- 13
- F
- %SC
- 001
-
-
- 000024
- 14
- S
-
-
- 000024
- 15
- F
- &F12
- 001
-
-
- 000025
- 01
- F
- &UMC
- 001
-
-
- 000025
- 02
- F
- &AVR
- 001
-
-
- 000025
- 03
- F
- &MIN
- 001
-
-
- 000025
- 04
- F
- &MAX
- 001
-
-
- 000025
- 05
- F
- &COUNT
- 001
-
-
- 000026
- 01
- F
- &ABC
- 001
-
-
- 000026
- 02
- S
-
-
- 000026
- 03
- F
- &F03
- 001
-
-
- 000027
- 01
- F
- &VGRID
- 001
-
-
- 000027
- 02
- F
- &VEXCEL
- 001
-
-
- 000027
- 03
- F
- &VLOTUS
- 001
-
-
- 000027
- 04
- S
-
-
- 000027
- 05
- F
- &GRAPH
- 001
-
-
- 000028
- 01
- M
- 000029
-
-
- 000028
- 02
- M
- 000030
-
-
- 000028
- 03
- F
- &AUF
- 001
-
-
- 000029
- 01
- F
- &OLX
- 001
-
-
- 000029
- 02
- F
- &OAD
- 001
-
-
- 000029
- 03
- S
-
-
- 000029
- 04
- F
- &AVE
- 001
-
-
- 000029
- 05
- S
-
-
- 000029
- 06
- F
- &ERW
- 001
-
-
- 000030
- 01
- F
- &OPT
- 001
-
-
- 000030
- 02
- S
-
-
- 000030
- 03
- F
- &CFI
- 001
-
-
- 000030
- 04
- F
- &CDF
- 001
-
-
- 000031
- 01
- F
- &RNT
- 001
-
-
- 000031
- 02
- M
- 000032
-
-
- 000031
- 03
- M
- 000033
-
-
- 000031
- 04
- S
-
-
- 000031
- 05
- F
- &F15
- 001
-
-
- 000032
- 01
- F
- &AQW
- 002
-
-
- 000032
- 02
- F
- &XXL
- 001
-
-
- 000032
- 03
- F
- %PC
- 002
-
-
- 000032
- 04
- F
- &XINT
- 001
-
-
- 000033
- 01
- F
- %SL
- 002
-
-
- 000033
- 02
- F
- %ML
- 001
-
-
- 000034
- 01
- F
- &ALL
- 002
-
-
- 000034
- 02
- F
- &SAL
- 002
-
-
- 000034
- 03
- S
-
-
- 000034
- 04
- F
- &ILT
- 002
-
-
- 000034
- 05
- F
- &ILD
- 001
-
-
- 000034
- 06
- S
-
-
- 000034
- 07
- F
- &OUP
- 001
-
-
- 000034
- 08
- F
- &ODN
- 002
-
-
- 000034
- 09
- S
-
-
- 000034
- 10
- M
- 000035
-
-
- 000034
- 11
- F
- &SUM
- 001
-
-
- 000034
- 12
- S
-
-
- 000034
- 13
- F
- %SC
- 001
-
-
- 000034
- 14
- S
-
-
- 000034
- 15
- F
- &F12
- 001
-
-
- 000035
- 01
- F
- &UMC
- 001
-
-
- 000035
- 02
- F
- &AVR
- 002
-
-
- 000035
- 03
- F
- &MIN
- 001
-
-
- 000035
- 04
- F
- &MAX
- 001
-
-
- 000035
- 05
- F
- &COUNT
- 001
-
-
- 000036
- 01
- F
- &ABC
- 001
-
-
- 000036
- 02
- S
-
-
- 000036
- 03
- F
- &F03
- 001
-
-
- 000037
- 01
- F
- &LIS
- 001
-
-
- 000037
- 02
- S
-
-
- 000037
- 03
- M
- 000038
-
-
- 000037
- 04
- S
-
-
- 000037
- 05
- M
- 000039
-
-
- 000037
- 06
- S
-
-
- 000037
- 07
- M
- 000040
-
-
- 000037
- 08
- S
-
-
- 000037
- 09
- F
- &NFO
- 001
-
-
- 000037
- 10
- F
- &LFO
- 001
-
-
- 000038
- 01
- F
- &OLX
- 001
-
-
- 000038
- 02
- F
- &OAD
- 001
-
-
- 000038
- 03
- S
-
-
- 000038
- 04
- F
- &AVE
- 001
-
-
- 000038
- 05
- S
-
-
- 000038
- 06
- F
- &ERW
- 002
-
-
- 000039
- 01
- F
- &KOM
- 001
-
-
- 000039
- 02
- F
- &AUF
- 002
-
-
- 000040
- 01
- F
- &OPT
- 002
-
-
- 000040
- 02
- S
-
-
- 000040
- 03
- F
- &CFI
- 002
-
-
- 000040
- 04
- F
- &CDF
- 002
-
-
- 000040
- 05
- S
-
-
- 000040
- 06
- F
- &DAU
- 001
-
-
- 000040
- 07
- F
- &DON
- 001
-
-
- 000040
- 08
- F
- &DOF
- 001
-
-
-
-
- 000001
- S
- List
- L
- STANDARD_FULLSCREEN List
-
-
- 000002
- S
- Export
- E
- STANDARD Save
-
-
- 000003
- S
- Send To
- S
-
-
- 000004
- S
- Edit
- E
- STANDARD
-
-
- 000005
- S
- Calculate
- C
-
-
- 000006
- S
- Goto
- G
- STANDARD
-
-
- 000007
- S
- Views
- I
-
-
- 000008
- S
- Settings
- S
- STANDARD_FULLSCREEN
-
-
- 000009
- S
- Layout
- A
- Sub STANDARD
-
-
- 000010
- S
- Columns
- C
-
-
- 000011
- S
- List
- L
- STANDARD List
-
-
- 000012
- S
- Export
- E
- STANDARD Save
-
-
- 000013
- S
- Send To
- S
-
-
- 000014
- S
- Edit
- E
- STANDARD
-
-
- 000015
- S
- Calculate
- C
-
-
- 000016
- S
- Goto
- G
- STANDARD
-
-
- 000017
- S
- Settings
- S
- STANDARD
-
-
- 000018
- S
- Layout
- A
- Sub STANDARD
-
-
- 000019
- S
- Summation Levels
- S
- Sub STANDARD
-
-
- 000020
- S
- Columns
- C
-
-
- 000021
- S
- List
- L
- STANDARD_FULLSCREEN List
-
-
- 000022
- S
- Export
- E
- STANDARD Save
-
-
- 000023
- S
- Send To
- S
-
-
- 000024
- S
- Edit
- E
- STANDARD
-
-
- 000025
- S
- Calculate
- C
-
-
- 000026
- S
- Goto
- G
- STANDARD
-
-
- 000027
- S
- Views
- I
-
-
- 000028
- S
- Settings
- S
- STANDARD_FULLSCREEN
-
-
- 000029
- S
- Layout
- A
- Sub STANDARD
-
-
- 000030
- S
- Columns
- C
-
-
- 000031
- S
- List
- L
- STANDARD List
-
-
- 000032
- S
- Export
- E
- STANDARD Save
-
-
- 000033
- S
- Send to
- S
-
-
- 000034
- S
- Edit
- E
- STANDARD
-
-
- 000035
- S
- Calculate
- C
-
-
- 000036
- S
- Goto
- G
- STANDARD
-
-
- 000037
- S
- Settings
- S
- STANDARD
-
-
- 000038
- S
- Layout
- A
- Sub STANDARD
-
-
- 000039
- S
- Summation levels
- S
- Sub STANDARD
-
-
- 000040
- S
- Columns
- C
-
-
-
-
- 000001
- 01
- 000001
-
-
- 000001
- 02
- 000004
-
-
- 000001
- 03
- 000006
-
-
- 000001
- 04
- 000007
-
-
- 000001
- 05
- 000008
-
-
- 000002
- 01
- 000011
-
-
- 000002
- 02
- 000014
-
-
- 000002
- 03
- 000016
-
-
- 000002
- 04
- 000017
-
-
- 000003
- 01
- 000021
-
-
- 000003
- 02
- 000024
-
-
- 000003
- 03
- 000026
-
-
- 000003
- 04
- 000027
-
-
- 000003
- 05
- 000028
-
-
- 000004
- 01
- 000031
-
-
- 000004
- 02
- 000034
-
-
- 000004
- 03
- 000036
-
-
- 000004
- 04
- 000037
-
-
-
-
- 000001
- 0001
- 01
- 39
-
-
- 000001
- 0001
- 02
- 37
-
-
- 000001
- 0001
- 03
- 08
-
-
- 000001
- 0001
- 04
- 05
-
-
- 000001
- 0001
- 05
- 06
-
-
- 000001
- 0001
- 06
- 28
-
-
- 000001
- 0001
- 07
- 40
-
-
- 000001
- 0001
- 08
- 29
-
-
- 000001
- 0001
- 09
- 38
-
-
- 000001
- 0001
- 10
- 30
-
-
- 000001
- 0001
- 11
- 46
-
-
- 000001
- 0001
- 12
- 43
-
-
- 000001
- 0001
- 13
- 44
-
-
- 000001
- 0001
- 14
- 45
-
-
- 000001
- 0001
- 15
- 31
-
-
- 000001
- 0001
- 16
- 25
-
-
- 000001
- 0001
- 17
- 47
-
-
- 000001
- 0001
- 18
- 32
-
-
- 000001
- 0001
- 19
- 33
-
-
- 000001
- 0001
- 20
- 34
-
-
- 000001
- 0001
- 21
- 36
-
-
- 000001
- 0001
- 22
- 13
-
-
- 000002
- 0001
- 01
- 39
-
-
- 000002
- 0001
- 02
- 37
-
-
- 000002
- 0001
- 03
- S
-
-
- 000002
- 0001
- 04
- 05
-
-
- 000002
- 0001
- 05
- 06
-
-
- 000002
- 0001
- 06
- S
-
-
- 000002
- 0001
- 07
- 28
-
-
- 000002
- 0001
- 08
- 40
-
-
- 000002
- 0001
- 09
- 29
-
-
- 000002
- 0001
- 10
- S
-
-
- 000002
- 0001
- 11
- 30
-
-
- 000002
- 0001
- 12
- 42
-
-
- 000002
- 0001
- 13
- 35
-
-
- 000002
- 0001
- 14
- 47
-
-
- 000002
- 0001
- 15
- S
-
-
- 000002
- 0001
- 16
- 43
-
-
- 000002
- 0001
- 17
- 44
-
-
- 000002
- 0001
- 18
- 45
-
-
- 000002
- 0001
- 19
- 31
-
-
- 000002
- 0001
- 20
- 25
-
-
- 000002
- 0001
- 21
- S
-
-
- 000002
- 0001
- 22
- 32
-
-
- 000002
- 0001
- 23
- 33
-
-
- 000002
- 0001
- 24
- 34
-
-
- 000002
- 0001
- 25
- S
-
-
- 000002
- 0001
- 26
- 41
-
-
- 000002
- 0001
- 27
- 07
-
-
- 000002
- 0001
- 28
- S
-
-
- 000002
- 0001
- 29
- 18
-
-
- 000002
- 0001
- 30
- 26
-
-
- 000002
- 0001
- 31
- 27
-
-
- 000002
- 0001
- 32
- 19
-
-
- 000003
- 0001
- 01
- 39
-
-
- 000003
- 0001
- 02
- 37
-
-
- 000003
- 0001
- 03
- 08
-
-
- 000003
- 0001
- 04
- 05
-
-
- 000003
- 0001
- 05
- 06
-
-
- 000003
- 0001
- 06
- 28
-
-
- 000003
- 0001
- 07
- 40
-
-
- 000003
- 0001
- 08
- 29
-
-
- 000003
- 0001
- 09
- 38
-
-
- 000003
- 0001
- 10
- 30
-
-
- 000003
- 0001
- 11
- 46
-
-
- 000003
- 0001
- 12
- 43
-
-
- 000003
- 0001
- 13
- 44
-
-
- 000003
- 0001
- 14
- 45
-
-
- 000003
- 0001
- 15
- 31
-
-
- 000003
- 0001
- 16
- 25
-
-
- 000003
- 0001
- 17
- 47
-
-
- 000003
- 0001
- 18
- 32
-
-
- 000003
- 0001
- 19
- 33
-
-
- 000003
- 0001
- 20
- 34
-
-
- 000003
- 0001
- 21
- 36
-
-
- 000003
- 0001
- 22
- 13
-
-
- 000004
- 0001
- 01
- 39
-
-
- 000004
- 0001
- 02
- 37
-
-
- 000004
- 0001
- 03
- S
-
-
- 000004
- 0001
- 04
- 05
-
-
- 000004
- 0001
- 05
- 06
-
-
- 000004
- 0001
- 06
- S
-
-
- 000004
- 0001
- 07
- 28
-
-
- 000004
- 0001
- 08
- 40
-
-
- 000004
- 0001
- 09
- 29
-
-
- 000004
- 0001
- 10
- 38
-
-
- 000004
- 0001
- 11
- S
-
-
- 000004
- 0001
- 12
- 30
-
-
- 000004
- 0001
- 13
- 42
-
-
- 000004
- 0001
- 14
- S
-
-
- 000004
- 0001
- 15
- 45
-
-
- 000004
- 0001
- 16
- S
-
-
- 000004
- 0001
- 17
- 32
-
-
- 000004
- 0001
- 18
- 33
-
-
- 000004
- 0001
- 19
- 34
-
-
- 000004
- 0001
- 20
- 09
-
-
- 000004
- 0001
- 21
- S
-
-
- 000004
- 0001
- 22
- 41
-
-
- 000004
- 0001
- 23
- 07
-
-
- 000004
- 0001
- 24
- S
-
-
- 000004
- 0001
- 25
- 18
-
-
- 000004
- 0001
- 26
- 26
-
-
- 000004
- 0001
- 27
- 27
-
-
- 000004
- 0001
- 28
- 19
-
-
-
-
- 000001
- 01
- &ELP
- 001
-
-
- 000001
- 02
- &IC1
- 001
-
-
- 000001
- 03
- &F03
- 001
-
-
- 000001
- 04
- &F4
- 001
-
-
- 000001
- 05
- &ALL
- 001
-
-
- 000001
- 06
- &SAL
- 001
-
-
- 000001
- 08
- &REFRESH
- 001
-
-
- 000001
- 11
- &DATA_SAVE
- 001
-
-
- 000001
- 12
- &F12
- 001
-
-
- 000001
- 13
- EXCEL
- 001
-
-
- 000001
- 15
- &F15
- 001
-
-
- 000001
- 25
- &ABC
- 001
-
-
- 000001
- 28
- &OUP
- 001
-
-
- 000001
- 29
- &ILT
- 001
-
-
- 000001
- 30
- &UMC
- 001
-
-
- 000001
- 31
- %SL
- 001
-
-
- 000001
- 32
- &OL0
- 001
-
-
- 000001
- 33
- &OAD
- 002
-
-
- 000001
- 34
- &AVE
- 002
-
-
- 000001
- 36
- &INFO
- 001
-
-
- 000001
- 37
- &EB9
- 001
-
-
- 000001
- 38
- &ILD
- 001
-
-
- 000001
- 39
- &ETA
- 001
-
-
- 000001
- 40
- &ODN
- 001
-
-
- 000001
- 42
- &SUM
- 001
-
-
- 000001
- 43
- &XXL
- 001
-
-
- 000001
- 44
- &AQW
- 001
-
-
- 000001
- 45
- %PC
- 001
-
-
- 000001
- 46
- &RNT_PREV
- 001
-
-
- 000001
- 47
- &GRAPH
- 001
-
-
- 000001
- 71
- %SC
- 001
-
-
- 000001
- 84
- %SC+
- 001
-
-
- 000001
- 86
- &RNT
- 001
-
-
- 000002
- 01
- &ELP
- 001
-
-
- 000002
- 02
- &IC1
- 001
-
-
- 000002
- 03
- &F03
- 001
-
-
- 000002
- 05
- &ALL
- 001
-
-
- 000002
- 06
- &SAL
- 001
-
-
- 000002
- 07
- &NFO
- 001
-
-
- 000002
- 08
- &NTE
- 001
-
-
- 000002
- 12
- &F12
- 001
-
-
- 000002
- 15
- &F15
- 001
-
-
- 000002
- 18
- &CRB
- 001
-
-
- 000002
- 19
- &CRE
- 001
-
-
- 000002
- 21
- P--
- 001
-
-
- 000002
- 22
- P-
- 001
-
-
- 000002
- 23
- P+
- 001
-
-
- 000002
- 24
- P++
- 001
-
-
- 000002
- 25
- &ABC
- 001
-
-
- 000002
- 26
- &CRL
- 001
-
-
- 000002
- 27
- &CRR
- 001
-
-
- 000002
- 28
- &OUP
- 001
-
-
- 000002
- 29
- &ILT
- 001
-
-
- 000002
- 30
- &UMC
- 001
-
-
- 000002
- 31
- %SL
- 001
-
-
- 000002
- 32
- &OL0
- 001
-
-
- 000002
- 33
- &OAD
- 002
-
-
- 000002
- 34
- &AVE
- 002
-
-
- 000002
- 35
- &XPA
- 001
-
-
- 000002
- 37
- &EB9
- 002
-
-
- 000002
- 39
- &ETA
- 001
-
-
- 000002
- 40
- &ODN
- 001
-
-
- 000002
- 41
- &LFO
- 002
-
-
- 000002
- 42
- &SUM
- 001
-
-
- 000002
- 43
- &XXL
- 001
-
-
- 000002
- 44
- &AQW
- 001
-
-
- 000002
- 45
- %PC
- 001
-
-
- 000002
- 46
- &RNT_PREV
- 001
-
-
- 000002
- 47
- &OMP
- 001
-
-
- 000002
- 48
- &XML
- 001
-
-
- 000002
- 71
- %SC
- 001
-
-
- 000002
- 80
- P--
- 001
-
-
- 000002
- 81
- P-
- 001
-
-
- 000002
- 82
- P+
- 001
-
-
- 000002
- 83
- P++
- 001
-
-
- 000002
- 84
- %SC+
- 001
-
-
- 000002
- 86
- &RNT
- 001
-
-
- 000003
- 01
- &ELP
- 001
-
-
- 000003
- 02
- &IC1
- 001
-
-
- 000003
- 03
- &F03
- 001
-
-
- 000003
- 04
- &F4
- 001
-
-
- 000003
- 05
- &ALL
- 001
-
-
- 000003
- 06
- &SAL
- 001
-
-
- 000003
- 08
- &REFRESH
- 001
-
-
- 000003
- 11
- &DATA_SAVE
- 001
-
-
- 000003
- 12
- &F12
- 001
-
-
- 000003
- 13
- EXCEL
- 001
-
-
- 000003
- 15
- &F15
- 001
-
-
- 000003
- 25
- &ABC
- 001
-
-
- 000003
- 28
- &OUP
- 001
-
-
- 000003
- 29
- &ILT
- 001
-
-
- 000003
- 30
- &UMC
- 001
-
-
- 000003
- 31
- %SL
- 001
-
-
- 000003
- 32
- &OL0
- 001
-
-
- 000003
- 33
- &OAD
- 002
-
-
- 000003
- 34
- &AVE
- 002
-
-
- 000003
- 36
- &INFO
- 001
-
-
- 000003
- 37
- &EB9
- 001
-
-
- 000003
- 38
- &ILD
- 001
-
-
- 000003
- 39
- &ETA
- 001
-
-
- 000003
- 40
- &ODN
- 001
-
-
- 000003
- 42
- &SUM
- 001
-
-
- 000003
- 43
- &XXL
- 001
-
-
- 000003
- 44
- &AQW
- 001
-
-
- 000003
- 45
- %PC
- 001
-
-
- 000003
- 46
- &RNT_PREV
- 001
-
-
- 000003
- 47
- &GRAPH
- 001
-
-
- 000003
- 71
- %SC
- 001
-
-
- 000003
- 84
- %SC+
- 001
-
-
- 000003
- 86
- &RNT
- 001
-
-
- 000004
- 01
- &ELP
- 001
-
-
- 000004
- 02
- &IC1
- 001
-
-
- 000004
- 03
- &F03
- 001
-
-
- 000004
- 05
- &ALL
- 002
-
-
- 000004
- 06
- &SAL
- 002
-
-
- 000004
- 07
- &NFO
- 001
-
-
- 000004
- 08
- &NTE
- 002
-
-
- 000004
- 09
- EXCEL
- 001
-
-
- 000004
- 12
- &F12
- 001
-
-
- 000004
- 15
- &F15
- 001
-
-
- 000004
- 18
- &CRB
- 001
-
-
- 000004
- 19
- &CRE
- 002
-
-
- 000004
- 21
- P--
- 001
-
-
- 000004
- 22
- P-
- 001
-
-
- 000004
- 23
- P+
- 002
-
-
- 000004
- 24
- P++
- 001
-
-
- 000004
- 25
- &ABC
- 001
-
-
- 000004
- 26
- &CRL
- 002
-
-
- 000004
- 27
- &CRR
- 002
-
-
- 000004
- 28
- &OUP
- 001
-
-
- 000004
- 29
- &ILT
- 002
-
-
- 000004
- 30
- &UMC
- 001
-
-
- 000004
- 31
- %SL
- 002
-
-
- 000004
- 32
- &OL0
- 002
-
-
- 000004
- 33
- &OAD
- 003
-
-
- 000004
- 34
- &AVE
- 003
-
-
- 000004
- 35
- &XPA
- 001
-
-
- 000004
- 37
- &EB9
- 003
-
-
- 000004
- 38
- &ILD
- 001
-
-
- 000004
- 39
- &ETA
- 001
-
-
- 000004
- 40
- &ODN
- 002
-
-
- 000004
- 41
- &LFO
- 003
-
-
- 000004
- 42
- &SUM
- 001
-
-
- 000004
- 43
- &XXL
- 001
-
-
- 000004
- 44
- &AQW
- 002
-
-
- 000004
- 45
- %PC
- 002
-
-
- 000004
- 46
- &RNT_PREV
- 002
-
-
- 000004
- 47
- &OMP
- 001
-
-
- 000004
- 48
- &XML
- 002
-
-
- 000004
- 71
- %SC
- 001
-
-
- 000004
- 80
- P--
- 001
-
-
- 000004
- 81
- P-
- 001
-
-
- 000004
- 82
- P+
- 002
-
-
- 000004
- 83
- P++
- 001
-
-
- 000004
- 84
- %SC+
- 002
-
-
- 000004
- 86
- &RNT
- 001
-
-
-
-
- ALV_STATUS
- %CH
-
-
- ALV_STATUS
- %ML
-
-
- ALV_STATUS
- %PC
-
-
- ALV_STATUS
- %SC
-
-
- ALV_STATUS
- %SC+
-
-
- ALV_STATUS
- %SL
-
-
- ALV_STATUS
- &ABC
-
-
- ALV_STATUS
- &ALL
-
-
- ALV_STATUS
- &AQW
-
-
- ALV_STATUS
- &AUF
-
-
- ALV_STATUS
- &AVE
-
-
- ALV_STATUS
- &AVR
-
-
- ALV_STATUS
- &BS
-
-
- ALV_STATUS
- &BS+
-
-
- ALV_STATUS
- &BS-
-
-
- ALV_STATUS
- &CDF
-
-
- ALV_STATUS
- &CFI
-
-
- ALV_STATUS
- &COUNT
-
-
- ALV_STATUS
- &CRB
-
-
- ALV_STATUS
- &CRE
-
-
- ALV_STATUS
- &CRL
-
-
- ALV_STATUS
- &CRR
-
-
- ALV_STATUS
- &DAU
-
-
- ALV_STATUS
- &DOF
-
-
- ALV_STATUS
- &DON
-
-
- ALV_STATUS
- &EB3
-
-
- ALV_STATUS
- &EB9
-
-
- ALV_STATUS
- &ELP
-
-
- ALV_STATUS
- &ERW
-
-
- ALV_STATUS
- &ETA
-
-
- ALV_STATUS
- &F03
-
-
- ALV_STATUS
- &F12
-
-
- ALV_STATUS
- &F15
-
-
- ALV_STATUS
- &IC1
-
-
- ALV_STATUS
- &ILD
-
-
- ALV_STATUS
- &ILT
-
-
- ALV_STATUS
- &KOM
-
-
- ALV_STATUS
- &LFO
-
-
- ALV_STATUS
- &LIS
-
-
- ALV_STATUS
- &MAX
-
-
- ALV_STATUS
- &MIN
-
-
- ALV_STATUS
- &NFO
-
-
- ALV_STATUS
- &NTE
-
-
- ALV_STATUS
- &OAD
-
-
- ALV_STATUS
- &ODN
-
-
- ALV_STATUS
- &OL0
-
-
- ALV_STATUS
- &OL1
-
-
- ALV_STATUS
- &OLX
-
-
- ALV_STATUS
- &OMP
-
-
- ALV_STATUS
- &OPT
-
-
- ALV_STATUS
- &OUP
-
-
- ALV_STATUS
- &RNT
-
-
- ALV_STATUS
- &SAL
-
-
- ALV_STATUS
- &SUM
-
-
- ALV_STATUS
- &UMC
-
-
- ALV_STATUS
- &XML
-
-
- ALV_STATUS
- &XPA
-
-
- ALV_STATUS
- &XXL
-
-
- ALV_STATUS
- BAC1
-
-
- ALV_STATUS
- BACK
-
-
- ALV_STATUS
- BEB1
-
-
- ALV_STATUS
- BEB2
-
-
- ALV_STATUS
- BEB3
-
-
- ALV_STATUS
- BEB9
-
-
- ALV_STATUS
- BEBN
-
-
- ALV_STATUS
- COL0
-
-
- ALV_STATUS
- COLX
-
-
- ALV_STATUS
- DETA
-
-
- ALV_STATUS
- DRUK
-
-
- ALV_STATUS
- DSAL
-
-
- ALV_STATUS
- ENTE
-
-
- ALV_STATUS
- EXCEL
-
-
- ALV_STATUS
- EXIT
-
-
- ALV_STATUS
- EXPA
-
-
- ALV_STATUS
- FILD
-
-
- ALV_STATUS
- FILT
-
-
- ALV_STATUS
- GLIS
-
-
- ALV_STATUS
- HELP
-
-
- ALV_STATUS
- INFO
-
-
- ALV_STATUS
- KOMP
-
-
- ALV_STATUS
- P+
-
-
- ALV_STATUS
- P++
-
-
- ALV_STATUS
- P-
-
-
- ALV_STATUS
- P--
-
-
- ALV_STATUS
- PF09
-
-
- ALV_STATUS
- PF13
-
-
- ALV_STATUS
- PIC1
-
-
- ALV_STATUS
- PICK
-
-
- ALV_STATUS
- PRI
-
-
- ALV_STATUS
- PRIN
-
-
- ALV_STATUS
- PRNT
-
-
- ALV_STATUS
- RW
-
-
- ALV_STATUS
- SALL
-
-
- ALV_STATUS
- SAUF
-
-
- ALV_STATUS
- SAVE
-
-
- ALV_STATUS
- SCRB
-
-
- ALV_STATUS
- SCRE
-
-
- ALV_STATUS
- SCRL
-
-
- ALV_STATUS
- SCRR
-
-
- ALV_STATUS
- SKOM
-
-
- ALV_STATUS
- SODN
-
-
- ALV_STATUS
- SOUP
-
-
- ALV_STATUS
- SUMC
-
-
- ALV_STATUS
- ZSUM
-
-
-
-
- A
- 000001
- D
- Standard Interface STANDARD_FULLSCREEN
-
-
- P
- 000001
- D
- X
- Standard Maximum Interaction STANDARD_FULLSCREEN
-
-
- B
- 000001
- 0001
- STANDARD_FULLSCREEN
-
-
- A
- 000002
- D
- Standard User Interface STANDARD
-
-
- P
- 000002
- D
- X
- Standard Maximum Interaction
-
-
- B
- 000002
- 0001
- D
- Standard Maximum Interaction
-
-
- A
- 000003
- D
- Standard Interface STANDARD_FULLSCREEN
-
-
- P
- 000003
- D
- X
- Standard Maximum Interaction STANDARD_FULLSCREEN
-
-
- B
- 000003
- 0001
- STANDARD_FULLSCREEN
-
-
- A
- 000004
- D
- Standard User Interface STANDARD
-
-
- P
- 000004
- D
- X
- Standard Maximum Interaction
-
-
- B
- 000004
- 0001
- D
- X
- Standard Maximum Interaction
-
-
-
-
- -
- R
- abap2xlsx Demo: Bind ALV OLE2
- 29
-
-
-
-
-
diff --git a/src/demos/zdemo_excel21.prog.abap b/src/demos/zdemo_excel21.prog.abap
deleted file mode 100644
index 7cebcd9..0000000
--- a/src/demos/zdemo_excel21.prog.abap
+++ /dev/null
@@ -1,123 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL21
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel21.
-
-TYPES:
- BEGIN OF t_color_style,
- color TYPE zexcel_style_color_argb,
- style TYPE zexcel_cell_style,
- END OF t_color_style.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_filled TYPE REF TO zcl_excel_style.
-
-DATA: color_styles TYPE TABLE OF t_color_style.
-
-FIELD-SYMBOLS: LIKE LINE OF color_styles.
-
-CONSTANTS: max TYPE i VALUE 255,
- step TYPE i VALUE 51.
-
-DATA: red TYPE i,
- green TYPE i,
- blue TYPE i,
- red_hex(1) TYPE x,
- green_hex(1) TYPE x,
- blue_hex(1) TYPE x,
- red_str TYPE string,
- green_str TYPE string,
- blue_str TYPE string.
-
-DATA: color TYPE zexcel_style_color_argb,
- tint TYPE zexcel_style_color_tint.
-
-DATA: row TYPE i,
- row_tmp TYPE i,
- column TYPE zexcel_cell_column VALUE 1,
- col_str TYPE zexcel_cell_column_alpha.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '21_BackgroundColorPicker.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- WHILE red <= max.
- green = 0.
- WHILE green <= max.
- blue = 0.
- WHILE blue <= max.
- red_hex = red.
- red_str = red_hex.
- green_hex = green.
- green_str = green_hex.
- blue_hex = blue.
- blue_str = blue_hex.
- " Create filled
- CONCATENATE 'FF' red_str green_str blue_str INTO color.
- APPEND INITIAL LINE TO color_styles ASSIGNING .
- lo_style_filled = lo_excel->add_new_style( ).
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-rgb = color.
- -color = color.
- -style = lo_style_filled->get_guid( ).
- blue = blue + step.
- ENDWHILE.
- green = green + step.
- ENDWHILE.
- red = red + step.
- ENDWHILE.
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Color Picker' ).
- LOOP AT color_styles ASSIGNING .
- row_tmp = ( max / step + 1 ) * 3.
- IF row = row_tmp.
- row = 0.
- column = column + 1.
- ENDIF.
- row = row + 1.
- col_str = zcl_excel_common=>convert_column2alpha( column ).
-
- " Fill the cell and apply one style
- lo_worksheet->set_cell( ip_column = col_str
- ip_row = row
- ip_value = -color
- ip_style = -style ).
- ENDLOOP.
-
- row = row + 2.
- tint = '-0.5'.
- DO 10 TIMES.
- column = 1.
- DO 10 TIMES.
- lo_style_filled = lo_excel->add_new_style( ).
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-theme = sy-index - 1.
- lo_style_filled->fill->fgcolor-tint = tint.
- -style = lo_style_filled->get_guid( ).
- col_str = zcl_excel_common=>convert_column2alpha( column ).
- lo_worksheet->set_cell_style( ip_column = col_str
- ip_row = row
- ip_style = -style ).
-
- ADD 1 TO column.
- ENDDO.
- ADD '0.1' TO tint.
- ADD 1 TO row.
- ENDDO.
-
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel21.prog.xml b/src/demos/zdemo_excel21.prog.xml
deleted file mode 100644
index ab72a90..0000000
--- a/src/demos/zdemo_excel21.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL21
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo:
- 15
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel22.prog.abap b/src/demos/zdemo_excel22.prog.abap
deleted file mode 100644
index d54fbf1..0000000
--- a/src/demos/zdemo_excel22.prog.abap
+++ /dev/null
@@ -1,176 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL22
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel22.
-
-TYPES: ty_sflight_lines TYPE TABLE OF sflight.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style TYPE REF TO zcl_excel_style,
- lo_style_date TYPE REF TO zcl_excel_style,
- lo_style_editable TYPE REF TO zcl_excel_style,
- lo_data_validation TYPE REF TO zcl_excel_data_validation.
-
-DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog,
- ls_table_settings TYPE zexcel_s_table_settings,
- ls_table_settings_out TYPE zexcel_s_table_settings.
-
-DATA: lv_style_guid TYPE zexcel_cell_style.
-
-DATA: lv_row TYPE char10.
-
-FIELD-SYMBOLS: TYPE zexcel_s_fieldcatalog.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '22_itab_fieldcatalog.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'PN_MASSIVE' ).
-
- DATA lt_test TYPE ty_sflight_lines.
- PERFORM load_fixed_data CHANGING lt_test.
-
- " sheet style (white background)
- lo_style = lo_excel->add_new_style( ).
- lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style->fill->fgcolor-rgb = zcl_excel_style_color=>c_white.
- lv_style_guid = lo_style->get_guid( ).
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->zif_excel_sheet_properties~set_style( lv_style_guid ).
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
- lo_worksheet->zif_excel_sheet_protection~password = zcl_excel_common=>encrypt_password( 'test' ).
- lo_worksheet->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_active.
- lo_worksheet->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_active.
- lo_worksheet->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_active.
-
- " Create cell style for display only fields
- lo_style = lo_excel->add_new_style( ).
- lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style->fill->fgcolor-rgb = zcl_excel_style_color=>c_gray.
- lo_style->number_format->format_code = zcl_excel_style_number_format=>c_format_text.
-
- " Create cell style for display only date field
- lo_style_date = lo_excel->add_new_style( ).
- lo_style_date->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_date->fill->fgcolor-rgb = zcl_excel_style_color=>c_gray.
- lo_style_date->number_format->format_code = zcl_excel_style_number_format=>c_format_date_ddmmyyyy.
-
- " Create cell style for editable fields
- lo_style_editable = lo_excel->add_new_style( ).
- lo_style_editable->protection->locked = zcl_excel_style_protection=>c_protection_unlocked.
-
- lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = lt_test ).
-
- LOOP AT lt_field_catalog ASSIGNING .
- CASE -fieldname.
- WHEN 'CARRID'.
- -position = 3.
- -dynpfld = abap_true.
- -style = lo_style->get_guid( ).
- WHEN 'CONNID'.
- -position = 1.
- -dynpfld = abap_true.
- -style = lo_style->get_guid( ).
- -scrtext_m = |Flight\r\nNumber|. " Demonstrates header on 2 lines
- WHEN 'FLDATE'.
- -position = 2.
- -dynpfld = abap_true.
- -style = lo_style_date->get_guid( ).
- WHEN 'PRICE'.
- -position = 4.
- -dynpfld = abap_true.
- -style = lo_style_editable->get_guid( ).
- -totals_function = zcl_excel_table=>totals_function_sum.
- WHEN OTHERS.
- -dynpfld = abap_false.
- ENDCASE.
- ENDLOOP.
-
- ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium2.
- ls_table_settings-show_row_stripes = abap_true.
-
- lo_worksheet->bind_table( EXPORTING
- ip_table = lt_test
- it_field_catalog = lt_field_catalog
- is_table_settings = ls_table_settings
- IMPORTING
- es_table_settings = ls_table_settings_out ).
-
- lo_worksheet->freeze_panes( ip_num_rows = 3 ). "freeze column headers when scrolling
-
- lo_data_validation = lo_worksheet->add_new_data_validation( ).
- lo_data_validation->type = zcl_excel_data_validation=>c_type_custom.
- lv_row = ls_table_settings_out-top_left_row.
- CONDENSE lv_row.
- CONCATENATE 'ISNUMBER(' ls_table_settings_out-top_left_column lv_row ')' INTO lo_data_validation->formula1.
- lo_data_validation->cell_row = ls_table_settings_out-top_left_row.
- lo_data_validation->cell_column = ls_table_settings_out-top_left_column.
- lo_data_validation->cell_row_to = ls_table_settings_out-bottom_right_row.
- lo_data_validation->cell_column_to = ls_table_settings_out-bottom_right_column.
-
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
-
-
-FORM load_fixed_data CHANGING ct_test TYPE ty_sflight_lines.
- DATA: lt_lines TYPE TABLE OF string,
- lv_line TYPE string,
- lt_fields TYPE TABLE OF string,
- lv_comp TYPE i,
- lv_field TYPE string,
- ls_test TYPE sflight.
- FIELD-SYMBOLS: TYPE simple.
-
- APPEND 'AA 0017 20171219 422 USD 747-400 385 371 191334 31 28 21 21' TO lt_lines.
- APPEND 'AA 0017 20180309 422 USD 747-400 385 365 189984 31 29 21 20' TO lt_lines.
- APPEND 'AA 0017 20180528 422 USD 747-400 385 374 193482 31 30 21 20' TO lt_lines.
- APPEND 'AA 0017 20180816 422 USD 747-400 385 372 193127 31 30 21 20' TO lt_lines.
- APPEND 'AA 0017 20181104 422 USD 747-400 385 44 23908 31 4 21 3' TO lt_lines.
- APPEND 'AA 0017 20190123 422 USD 747-400 385 40 20347 31 3 21 2' TO lt_lines.
- APPEND 'AZ 0555 20171219 185 EUR 737-800 140 133 32143 12 12 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180309 185 EUR 737-800 140 137 32595 12 12 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180528 185 EUR 737-800 140 134 31899 12 11 10 10' TO lt_lines.
- APPEND 'AZ 0555 20180816 185 EUR 737-800 140 128 29775 12 10 10 9' TO lt_lines.
- APPEND 'AZ 0555 20181104 185 EUR 737-800 140 0 0 12 0 10 0' TO lt_lines.
- APPEND 'AZ 0555 20190123 185 EUR 737-800 140 23 5392 12 1 10 2' TO lt_lines.
- APPEND 'AZ 0789 20171219 1030 EUR 767-200 260 250 307176 21 20 11 11' TO lt_lines.
- APPEND 'AZ 0789 20180309 1030 EUR 767-200 260 252 306054 21 20 11 10' TO lt_lines.
- APPEND 'AZ 0789 20180528 1030 EUR 767-200 260 252 307063 21 20 11 10' TO lt_lines.
- APPEND 'AZ 0789 20180816 1030 EUR 767-200 260 249 300739 21 19 11 10' TO lt_lines.
- APPEND 'AZ 0789 20181104 1030 EUR 767-200 260 104 127647 21 8 11 5' TO lt_lines.
- APPEND 'AZ 0789 20190123 1030 EUR 767-200 260 18 22268 21 1 11 1' TO lt_lines.
- APPEND 'DL 0106 20171217 611 USD A380-800 475 458 324379 30 29 20 20' TO lt_lines.
- APPEND 'DL 0106 20180307 611 USD A380-800 475 458 324330 30 30 20 20' TO lt_lines.
- APPEND 'DL 0106 20180526 611 USD A380-800 475 459 328149 30 29 20 20' TO lt_lines.
- APPEND 'DL 0106 20180814 611 USD A380-800 475 462 326805 30 30 20 18' TO lt_lines.
- APPEND 'DL 0106 20181102 611 USD A380-800 475 167 115554 30 10 20 6' TO lt_lines.
- APPEND 'DL 0106 20190121 611 USD A380-800 475 11 9073 30 1 20 1' TO lt_lines.
- LOOP AT lt_lines INTO lv_line.
- CONDENSE lv_line.
- SPLIT lv_line AT space INTO TABLE lt_fields.
- lv_comp = 2.
- LOOP AT lt_fields INTO lv_field.
- ASSIGN COMPONENT lv_comp OF STRUCTURE ls_test TO .
- = lv_field.
- lv_comp = lv_comp + 1.
- ENDLOOP.
- APPEND ls_test TO ct_test.
- ENDLOOP.
-ENDFORM.
diff --git a/src/demos/zdemo_excel22.prog.xml b/src/demos/zdemo_excel22.prog.xml
deleted file mode 100644
index 30cbc8c..0000000
--- a/src/demos/zdemo_excel22.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL22
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Export internal table
- 38
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel23.prog.abap b/src/demos/zdemo_excel23.prog.abap
deleted file mode 100644
index 9716d62..0000000
--- a/src/demos/zdemo_excel23.prog.abap
+++ /dev/null
@@ -1,88 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL23
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel23.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '23_Sheets_with_and_without_grid_lines.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet1' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'This is the first sheet with grid lines and print centered horizontal & vertical' ).
- lo_worksheet->set_show_gridlines( i_show_gridlines = abap_true ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet2!B2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'This is a link to the second sheet' ip_hyperlink = lo_hyperlink ).
-
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
- lo_worksheet->zif_excel_sheet_properties~zoomscale = 150.
- lo_worksheet->zif_excel_sheet_properties~zoomscale_normal = 150.
-
- lo_worksheet->sheet_setup->vertical_centered = abap_true.
- lo_worksheet->sheet_setup->horizontal_centered = abap_true.
-
- " Second sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'This is the second sheet with grid lines in display and print' ).
- lo_worksheet->set_show_gridlines( i_show_gridlines = abap_true ).
- lo_worksheet->set_print_gridlines( i_print_gridlines = abap_true ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet3!B2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'This is link to the third sheet' ip_hyperlink = lo_hyperlink ).
-
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
- lo_worksheet->zif_excel_sheet_properties~zoomscale = 160.
- lo_worksheet->zif_excel_sheet_properties~zoomscale_pagelayoutview = 200.
-
- " Third sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet3' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'This is the third sheet without grid lines in display and print' ).
- lo_worksheet->set_show_gridlines( i_show_gridlines = abap_false ).
- lo_worksheet->set_print_gridlines( i_print_gridlines = abap_false ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet4!B2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'This is link to the fourth sheet' ip_hyperlink = lo_hyperlink ).
-
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
- lo_worksheet->zif_excel_sheet_properties~zoomscale = 170.
- lo_worksheet->zif_excel_sheet_properties~zoomscale_sheetlayoutview = 150.
-
- " Fourth sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet4' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'This is the fourth sheet with grid lines and print centered ONLY horizontal' ).
- lo_worksheet->set_show_gridlines( i_show_gridlines = abap_true ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet1!B2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'This is link to the first sheet' ip_hyperlink = lo_hyperlink ).
-
- lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
- lo_worksheet->zif_excel_sheet_properties~zoomscale = 150.
- lo_worksheet->zif_excel_sheet_properties~zoomscale_normal = 150.
-
- lo_worksheet->sheet_setup->horizontal_centered = abap_true.
-
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel23.prog.xml b/src/demos/zdemo_excel23.prog.xml
deleted file mode 100644
index 0ee7747..0000000
--- a/src/demos/zdemo_excel23.prog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL23
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Multiple sheets with and w/o grid lines, print options
- 70
-
-
-
-
-
diff --git a/src/demos/zdemo_excel24.prog.abap b/src/demos/zdemo_excel24.prog.abap
deleted file mode 100644
index 2bdee7f..0000000
--- a/src/demos/zdemo_excel24.prog.abap
+++ /dev/null
@@ -1,109 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL23
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel24.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-DATA: lv_value TYPE string.
-DATA: lv_date TYPE d VALUE '19000226',
- lv_row TYPE i.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '24_Sheets_with_different_default_date_formats.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet1' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Default Date Format' ).
- " Insert date
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 3 ip_value = 'Date:' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 4 ip_value = lv_date ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet2!A1' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 6 ip_value = 'This is a link to the second sheet' ip_hyperlink = lo_hyperlink ).
- lo_column = lo_worksheet->get_column( ip_column = 'A' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
-
-
- " Second sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_default_excel_date_format( zcl_excel_style_number_format=>c_format_date_yyyymmdd ).
- lo_worksheet->set_title( ip_title = 'Sheet2' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Date Format set to YYYYMMDD' ).
- " Insert current date
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 3 ip_value = 'Date:' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 4 ip_value = lv_date ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet3!B2' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 6 ip_value = 'This is link to the third sheet' ip_hyperlink = lo_hyperlink ).
-
- " Third sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- " TODO: It seems that the zcl_excel_style_number_format=>c_format_date_yyyymmddslash
- " does not produce a valid output
- lo_worksheet->set_default_excel_date_format( zcl_excel_style_number_format=>c_format_date_yyyymmddslash ).
- lo_worksheet->set_title( ip_title = 'Sheet3' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Date Format set to YYYY/MM/DD' ).
- " Insert current date
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 3 ip_value = 'Date:' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 4 ip_value = lv_date ).
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet4!B2' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 6 ip_value = 'This is link to the 4th sheet' ip_hyperlink = lo_hyperlink ).
-
- " 4th sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- " Illustrate the Problem caused by:
- " Excel 2000 incorrectly assumes that the year 1900 is a leap year.
- " http://support.microsoft.com/kb/214326/en-us
- lo_worksheet->set_title( ip_title = 'Sheet4' ).
- " Loop from Start Date to the Max Date current data in daily steps
- CONSTANTS: lv_max TYPE d VALUE '19000302'.
-
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'Formated date' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Integer value for this date' ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 3 ip_value = 'Date as string' ).
-
- lv_row = 4.
- WHILE lv_date < lv_max.
- lo_worksheet->set_cell( ip_column = 'B' ip_row = lv_row ip_value = lv_date ).
- lv_value = zcl_excel_common=>date_to_excel_string( lv_date ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = lv_row ip_value = lv_value ).
- lv_value = lv_date.
- lo_worksheet->set_cell( ip_column = 'D' ip_row = lv_row ip_value = lv_value ).
- lv_date = lv_date + 1.
- lv_row = lv_row + 1.
- ENDWHILE.
-
- lv_row = lv_row + 1.
-
- lo_hyperlink = zcl_excel_hyperlink=>create_internal_link( iv_location = 'Sheet1!B2' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = lv_row ip_value = 'This is link to the first sheet' ip_hyperlink = lo_hyperlink ).
-
- lo_excel->set_active_sheet_index_by_name( 'Sheet1' ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel24.prog.xml b/src/demos/zdemo_excel24.prog.xml
deleted file mode 100644
index 48326ff..0000000
--- a/src/demos/zdemo_excel24.prog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL24
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Multiple sheets with different default date formats
- 70
-
-
-
-
-
diff --git a/src/demos/zdemo_excel25.prog.abap b/src/demos/zdemo_excel25.prog.abap
deleted file mode 100644
index e667781..0000000
--- a/src/demos/zdemo_excel25.prog.abap
+++ /dev/null
@@ -1,169 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL25
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel25.
-
-TYPES: BEGIN OF ty_f4_path,
- pathintern TYPE filepath-pathintern,
- pathname TYPE pathtext-pathname,
- pathextern TYPE path-pathextern,
- END OF ty_f4_path.
-
-DATA: lt_r_fldval TYPE RANGE OF filepath-pathintern,
- lt_value TYPE TABLE OF ty_f4_path,
- ls_value TYPE ty_f4_path.
-
-PARAMETERS log_path TYPE filepath-pathintern DEFAULT 'LOCAL_TEMPORARY_FILES'.
-SELECTION-SCREEN COMMENT /35(83) physpath.
-PARAMETERS filename TYPE string LOWER CASE DEFAULT '25_HelloWorld.xlsx'.
-PARAMETERS param_1 TYPE string LOWER CASE.
-PARAMETERS param_2 TYPE string LOWER CASE.
-
-AT SELECTION-SCREEN OUTPUT.
-
- PERFORM read_file_paths.
- READ TABLE lt_value WITH KEY pathintern = log_path INTO ls_value.
- physpath = ls_value-pathextern.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR log_path.
-
- DATA: lt_return TYPE TABLE OF ddshretval,
- ls_return TYPE ddshretval,
- lt_dynpfield TYPE TABLE OF dynpread,
- ls_dynpfield TYPE dynpread.
-
- CALL FUNCTION 'DYNP_VALUES_READ'
- EXPORTING
- dyname = sy-repid
- dynumb = sy-dynnr
- request = 'A' " read all screen fields
- TABLES
- dynpfields = lt_dynpfield
- EXCEPTIONS
- OTHERS = 9.
-
- READ TABLE lt_dynpfield WITH KEY fieldname = 'LOG_PATH' INTO ls_dynpfield.
- log_path = ls_dynpfield-fieldvalue.
-
- PERFORM read_file_paths.
-
- CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
- EXPORTING
- value_org = 'S'
- multiple_choice = ' '
- retfield = 'PATHINTERN'
- TABLES
- value_tab = lt_value
- return_tab = lt_return
- EXCEPTIONS
- OTHERS = 0.
-
- IF lt_return IS INITIAL.
- RETURN.
- ENDIF.
-
- READ TABLE lt_return INDEX 1 INTO ls_return.
- READ TABLE lt_value WITH KEY pathintern = ls_return-fieldval INTO ls_value.
-
- DELETE lt_dynpfield WHERE fieldname = 'LOG_PATH' OR fieldname = 'PHYSPATH'.
- ls_dynpfield-fieldname = 'LOG_PATH'.
- ls_dynpfield-fieldvalue = ls_value-pathintern.
- APPEND ls_dynpfield TO lt_dynpfield.
- ls_dynpfield-fieldname = 'PHYSPATH'.
- ls_dynpfield-fieldvalue = ls_value-pathextern.
- APPEND ls_dynpfield TO lt_dynpfield.
-
- CALL FUNCTION 'DYNP_VALUES_UPDATE'
- EXPORTING
- dyname = sy-repid
- dynumb = sy-dynnr
- TABLES
- dynpfields = lt_dynpfield
- EXCEPTIONS
- OTHERS = 8.
-
-FORM read_file_paths.
-
- DATA: ls_r_fldval LIKE LINE OF lt_r_fldval.
-
- CLEAR lt_r_fldval.
- IF log_path CA '*'.
- ls_r_fldval-sign = 'I'.
- ls_r_fldval-option = 'CP'.
- ls_r_fldval-low = log_path.
- APPEND ls_r_fldval TO lt_r_fldval.
- ENDIF.
-
- SELECT filepath~pathintern pathtext~pathname path~pathextern
- FROM filepath
- INNER JOIN path ON path~pathintern = filepath~pathintern
- INNER JOIN opsystem ON opsystem~filesys = path~filesys AND opsystem~opsys = sy-opsys
- LEFT JOIN pathtext ON pathtext~pathintern = filepath~pathintern AND pathtext~language = sy-langu
- INTO TABLE lt_value
- WHERE filepath~pathintern IN lt_r_fldval.
-
-ENDFORM.
-
-START-OF-SELECTION.
-
-DATA: lo_excel TYPE REF TO zcl_excel.
-DATA: lo_excel_writer TYPE REF TO zif_excel_writer.
-DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet.
-DATA: lo_exception TYPE REF TO cx_root.
-DATA: lv_file TYPE xstring.
-DATA: lv_default_file_name TYPE string.
-DATA: lv_default_file_name2 TYPE c LENGTH 255.
-DATA: lv_error TYPE string.
-
-CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
- EXPORTING
- logical_path = log_path
- file_name = filename
- parameter_1 = param_1
- parameter_2 = param_2
- IMPORTING
- file_name_with_path = lv_default_file_name " File name with path
- EXCEPTIONS
- other = 1.
-IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
-ENDIF.
-
-" Creates active sheet
-CREATE OBJECT lo_excel.
-
-" Get active sheet
-lo_worksheet = lo_excel->get_active_worksheet( ).
-lo_worksheet->set_title( ip_title = 'Sheet1' ).
-lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
-
-CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
-lv_file = lo_excel_writer->write_file( lo_excel ).
-
-TRY.
- OPEN DATASET lv_default_file_name FOR OUTPUT IN BINARY MODE.
- IF sy-subrc <> 0.
- RAISE EXCEPTION TYPE cx_sy_file_open
- EXPORTING
- filename = lv_default_file_name
- errorcode = sy-subrc
- errortext = |Cannot create or open file - Check Tx FILE Logical Path 'LOCAL_TEMPORARY_FILES'|.
- ENDIF.
- TRANSFER lv_file TO lv_default_file_name.
-
- CLOSE DATASET lv_default_file_name.
- CATCH cx_root INTO lo_exception.
- lv_error = lo_exception->get_text( ).
- MESSAGE lv_error TYPE 'I'.
- STOP.
-ENDTRY.
-
-lv_default_file_name2 = lv_default_file_name.
-SET PARAMETER ID 'GR8' FIELD lv_default_file_name2.
-SUBMIT zdemo_excel37 VIA SELECTION-SCREEN WITH p_applse = abap_true AND RETURN.
diff --git a/src/demos/zdemo_excel25.prog.xml b/src/demos/zdemo_excel25.prog.xml
deleted file mode 100644
index 708b1e3..0000000
--- a/src/demos/zdemo_excel25.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL25
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Write Hello World using Logical Path on the App Server
- 70
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel26.prog.abap b/src/demos/zdemo_excel26.prog.abap
deleted file mode 100644
index 2b830e9..0000000
--- a/src/demos/zdemo_excel26.prog.abap
+++ /dev/null
@@ -1,207 +0,0 @@
-*--------------------------------------------------------------------*
-* REPORT ZDEMO_EXCEL26
-* Demo for method zcl_excel_worksheet-bind_object:
-* export data from ALV (CL_GUI_ALV_GRID) object or cl_salv_table object
-* to Excel.
-*--------------------------------------------------------------------*
-REPORT zdemo_excel26.
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events DEFINITION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events DEFINITION.
- PUBLIC SECTION.
- METHODS:
- on_user_command FOR EVENT added_function OF cl_salv_events
- IMPORTING e_salv_function.
-ENDCLASS. "lcl_handle_events DEFINITION
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events IMPLEMENTATION.
- METHOD on_user_command.
- PERFORM user_command." using e_salv_function text-i08.
- ENDMETHOD. "on_user_command
-ENDCLASS. "lcl_handle_events IMPLEMENTATION
-
-*--------------------------------------------------------------------*
-* DATA DECLARATION
-*--------------------------------------------------------------------*
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_salv TYPE REF TO cl_salv_table,
- gr_events TYPE REF TO lcl_handle_events,
- lr_events TYPE REF TO cl_salv_events_table,
- gt_sbook TYPE TABLE OF sbook.
-
-DATA: l_path TYPE string, " local dir
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS:
- lv_default_file_name TYPE string VALUE '26_Bind_ALV.xlsx'.
-*--------------------------------------------------------------------*
-*START-OF-SELECTION
-*--------------------------------------------------------------------*
-
-START-OF-SELECTION.
-
-* get data
-* ------------------------------------------
-
- SELECT *
- INTO TABLE gt_sbook[]
- FROM sbook "#EC CI_NOWHERE
- UP TO 10 ROWS.
-
-* Display ALV
-* ------------------------------------------
-
- TRY.
- cl_salv_table=>factory(
- EXPORTING
- list_display = abap_false
- IMPORTING
- r_salv_table = lo_salv
- CHANGING
- t_table = gt_sbook[] ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- TRY.
- lo_salv->set_screen_status(
- EXPORTING
- report = sy-repid
- pfstatus = 'ALV_STATUS'
- set_functions = lo_salv->c_functions_all ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- lr_events = lo_salv->get_event( ).
- CREATE OBJECT gr_events.
- SET HANDLER gr_events->on_user_command FOR lr_events.
-
- lo_salv->display( ).
-
-
-*&---------------------------------------------------------------------*
-*& Form USER_COMMAND
-*&---------------------------------------------------------------------*
-* ALV user command
-*--------------------------------------------------------------------*
-FORM user_command .
- DATA: lo_error TYPE REF TO zcx_excel,
- lv_message TYPE string.
- IF sy-ucomm = 'EXCEL'.
-
-* get save file path
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = l_path ).
- cl_gui_cfw=>flush( ).
- cl_gui_frontend_services=>directory_browse(
- EXPORTING initial_folder = l_path
- CHANGING selected_folder = l_path ).
-
- IF l_path IS INITIAL.
- cl_gui_frontend_services=>get_sapgui_workdir(
- CHANGING sapworkdir = lv_workdir ).
- l_path = lv_workdir.
- ENDIF.
-
- cl_gui_frontend_services=>get_file_separator(
- CHANGING file_separator = lv_file_separator ).
-
- CONCATENATE l_path lv_file_separator lv_default_file_name
- INTO l_path.
-
-* export file to save file path
- TRY.
- PERFORM export_to_excel.
- CATCH zcx_excel INTO lo_error.
- lv_message = lo_error->get_text( ).
- MESSAGE lv_message TYPE 'I' DISPLAY LIKE 'E'.
- ENDTRY.
-
- ENDIF.
-ENDFORM. " USER_COMMAND
-
-*--------------------------------------------------------------------*
-* FORM EXPORT_TO_EXCEL
-*--------------------------------------------------------------------*
-* This subroutine is principal demo session
-*--------------------------------------------------------------------*
-FORM export_to_excel RAISING zcx_excel.
- DATA: lo_error TYPE REF TO zcx_excel,
- lv_message TYPE string.
-
-* create zcl_excel_worksheet object
-
- CREATE OBJECT lo_excel.
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet1' ).
-
-* write to excel using method Bin_object
- lo_worksheet->bind_alv(
- io_alv = lo_salv
- it_table = gt_sbook
- i_top = 2
- i_left = 1
- ).
-
- PERFORM write_file.
-
-ENDFORM. "EXPORT_TO_EXCEL
-*&---------------------------------------------------------------------*
-*& Form WRITE_FILE
-*&---------------------------------------------------------------------*
-* text
-*----------------------------------------------------------------------*
-* --> p1 text
-* <-- p2 text
-*----------------------------------------------------------------------*
-FORM write_file RAISING zcx_excel.
- DATA: lt_file TYPE solix_tab,
- l_bytecount TYPE i,
- l_file TYPE xstring.
-
- DATA: lo_excel_writer TYPE REF TO zif_excel_writer.
-
- DATA: ls_seoclass TYPE seoclass.
-
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
- l_file = lo_excel_writer->write_file( lo_excel ).
-
- SELECT SINGLE * INTO ls_seoclass
- FROM seoclass
- WHERE clsname = 'CL_BCS_CONVERT'.
-
- IF sy-subrc = 0.
- CALL METHOD (ls_seoclass-clsname)=>xstring_to_solix
- EXPORTING
- iv_xstring = l_file
- RECEIVING
- et_solix = lt_file.
-
- l_bytecount = xstrlen( l_file ).
- ELSE.
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = l_file
- IMPORTING
- output_length = l_bytecount
- TABLES
- binary_tab = lt_file.
- ENDIF.
-
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = l_bytecount
- filename = l_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file ).
-
-ENDFORM. " WRITE_FILE
diff --git a/src/demos/zdemo_excel26.prog.xml b/src/demos/zdemo_excel26.prog.xml
deleted file mode 100644
index a1772c2..0000000
--- a/src/demos/zdemo_excel26.prog.xml
+++ /dev/null
@@ -1,991 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL26
- 1
- T
- E
- X
- X
-
-
-
- 000010
- 000010
-
-
-
- ALV_STATUS
- D
- 000001
- 000001
- 0001
- Standard for General List Output
-
-
-
-
- %PC
- 001
- S
- ICON_EXPORT
- @49@
- Local file...
-
-
- %SC
- 001
- S
- ICON_SEARCH
- @13@
- Find
-
-
- %SC+
- 001
- S
- ICON_SEARCH_NEXT
- @4E@
- Find next
-
-
- %SL
- 001
- S
- Mail recipient
-
-
- &ABC
- 001
- S
- ABC Analysis
-
-
- &ALL
- 001
- S
- ICON_SELECT_ALL
- @4B@
- Select all
-
-
- &AQW
- 001
- S
- Word processing...
-
-
- &AVE
- 001
- S
- ICON_ALV_VARIANT_SAVE
- @DN@
- Save layout...
-
-
- &CRB
- 001
- S
- ICON_TOTAL_LEFT
- @0B@
- First Column
-
-
- &CRE
- 001
- S
- ICON_TOTAL_RIGHT
- @0C@
- Last column
-
-
- &CRL
- 001
- S
- ICON_COLUMN_LEFT
- @0D@
- Column left
-
-
- &CRR
- 001
- S
- ICON_COLUMN_RIGHT
- @0E@
- Column right
-
-
- &EB9
- 001
- S
- ICON_TABLE_SETTINGS
- @36@
- Call Up Report
-
-
- &ETA
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Details
-
-
- &F03
- 001
- S
- Back
-
-
- &F12
- 001
- S
- ICON_CANCEL
- @0W@
- Cancel
-
-
- &F15
- 001
- S
- Exit
-
-
- &IC1
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Choose
- S
-
-
- &ILD
- 001
- S
- ICON_FILTER_UNDO
- @GD@
- Delete Filter
-
-
- &ILT
- 001
- S
- ICON_FILTER
- @4G@
- Set filter
-
-
- &LFO
- 001
- S
- ICON_INFORMATION
- @0S@
- List status...
-
-
- &NFO
- 001
- S
- ICON_INFORMATION
- @0S@
- Selections...
- Selections
-
-
- &NTE
- 001
- S
- Refresh
-
-
- &OAD
- 001
- S
- ICON_ALV_VARIANT_CHOOSE
- @DM@
- Select layout...
-
-
- &ODN
- 001
- S
- ICON_SORT_DOWN
- @3F@
- Sort in descendin.
-
-
- &OL0
- 001
- S
- ICON_ALV_VARIANTS
- @LZ@
- Change layout...
-
-
- &OMP
- 001
- S
- Collapse
-
-
- &OUP
- 001
- S
- ICON_SORT_UP
- @3E@
- Sort in Ascending...
-
-
- &RNT
- 001
- S
- ICON_PRINT
- @0X@
- Print
-
-
- &RNT_PREV
- 001
- S
- Print preview
-
-
- &SAL
- 001
- S
- ICON_DESELECT_ALL
- @4D@
- Deselect all
-
-
- &SUM
- 001
- S
- ICON_INTERMEDIATE_SUM
- @5V@
- Subtotals...
-
-
- &UMC
- 001
- S
- ICON_SUM
- @3Z@
- Total
-
-
- &XML
- 001
- S
- XML Export...
-
-
- &XPA
- 001
- S
- Expand
-
-
- &XXL
- 001
- S
- Spreadsheet...
-
-
- EXCEL
- 001
- S
- ICON_XLV
- @J3@
- Excel
- Export to Excel
- Export to Excel
-
-
- P
- 001
- S
- First Page
-
-
- P+
- 001
- S
- ICON_NEXT_PAGE
- @30@
- Next page
-
-
- P++
- 001
- S
- ICON_LAST_PAGE
- @31@
- Last Page
-
-
- P-
- 001
- S
- ICON_PREVIOUS_PAGE
- @2Z@
- Previous Page
-
-
- P--
- 001
- S
- ICON_FIRST_PAGE
- @2Y@
- First Page
-
-
-
-
- 000001
- S
- List
-
-
- 000002
- S
- Edit
-
-
- 000003
- S
- Goto
-
-
- 000004
- S
- Settings
-
-
-
-
- 000001
- 01
- 000001
-
-
- 000001
- 02
- 000002
-
-
- 000001
- 03
- 000003
-
-
- 000001
- 04
- 000004
-
-
-
-
- 000001
- 0001
- 01
- 39
-
-
- 000001
- 0001
- 02
- 37
-
-
- 000001
- 0001
- 04
- 05
-
-
- 000001
- 0001
- 05
- 06
-
-
- 000001
- 0001
- 07
- 28
-
-
- 000001
- 0001
- 08
- 40
-
-
- 000001
- 0001
- 09
- 29
-
-
- 000001
- 0001
- 10
- 38
-
-
- 000001
- 0001
- 12
- 30
-
-
- 000001
- 0001
- 13
- 42
-
-
- 000001
- 0001
- 15
- 45
-
-
- 000001
- 0001
- 17
- 32
-
-
- 000001
- 0001
- 18
- 33
-
-
- 000001
- 0001
- 19
- 34
-
-
- 000001
- 0001
- 20
- 09
-
-
- 000001
- 0001
- 22
- 41
-
-
- 000001
- 0001
- 23
- 07
-
-
- 000001
- 0001
- 25
- 18
-
-
- 000001
- 0001
- 26
- 26
-
-
- 000001
- 0001
- 27
- 27
-
-
- 000001
- 0001
- 28
- 19
-
-
-
-
- 000001
- 02
- &IC1
- 001
-
-
- 000001
- 03
- &F03
- 001
-
-
- 000001
- 05
- &ALL
- 001
-
-
- 000001
- 06
- &SAL
- 001
-
-
- 000001
- 07
- &NFO
- 001
-
-
- 000001
- 08
- &NTE
- 001
-
-
- 000001
- 09
- EXCEL
- 001
-
-
- 000001
- 12
- &F12
- 001
-
-
- 000001
- 15
- &F15
- 001
-
-
- 000001
- 18
- &CRB
- 001
-
-
- 000001
- 19
- &CRE
- 001
-
-
- 000001
- 21
- P
- 001
-
-
- 000001
- 22
- P-
- 001
-
-
- 000001
- 23
- P+
- 001
-
-
- 000001
- 24
- P++
- 001
-
-
- 000001
- 25
- &ABC
- 001
-
-
- 000001
- 26
- &CRL
- 001
-
-
- 000001
- 27
- &CRR
- 001
-
-
- 000001
- 28
- &OUP
- 001
-
-
- 000001
- 29
- &ILT
- 001
-
-
- 000001
- 30
- &UMC
- 001
-
-
- 000001
- 31
- %SL
- 001
-
-
- 000001
- 32
- &OL0
- 001
-
-
- 000001
- 33
- &OAD
- 001
-
-
- 000001
- 34
- &AVE
- 001
-
-
- 000001
- 35
- &XPA
- 001
-
-
- 000001
- 37
- &EB9
- 001
-
-
- 000001
- 38
- &ILD
- 001
-
-
- 000001
- 39
- &ETA
- 001
-
-
- 000001
- 40
- &ODN
- 001
-
-
- 000001
- 41
- &LFO
- 001
-
-
- 000001
- 42
- &SUM
- 001
-
-
- 000001
- 43
- &XXL
- 001
-
-
- 000001
- 44
- &AQW
- 001
-
-
- 000001
- 45
- %PC
- 001
-
-
- 000001
- 46
- &RNT_PREV
- 001
-
-
- 000001
- 47
- &OMP
- 001
-
-
- 000001
- 48
- &XML
- 001
-
-
- 000001
- 71
- %SC
- 001
-
-
- 000001
- 80
- P--
- 001
-
-
- 000001
- 81
- P-
- 001
-
-
- 000001
- 82
- P+
- 001
-
-
- 000001
- 83
- P++
- 001
-
-
- 000001
- 84
- %SC+
- 001
-
-
- 000001
- 86
- &RNT
- 001
-
-
-
-
- ALV_STATUS
- %PC
-
-
- ALV_STATUS
- %SC
-
-
- ALV_STATUS
- %SC+
-
-
- ALV_STATUS
- %SL
-
-
- ALV_STATUS
- &ABC
-
-
- ALV_STATUS
- &ALL
-
-
- ALV_STATUS
- &AQW
-
-
- ALV_STATUS
- &AVE
-
-
- ALV_STATUS
- &CRB
-
-
- ALV_STATUS
- &CRE
-
-
- ALV_STATUS
- &CRL
-
-
- ALV_STATUS
- &CRR
-
-
- ALV_STATUS
- &EB9
-
-
- ALV_STATUS
- &ETA
-
-
- ALV_STATUS
- &F03
-
-
- ALV_STATUS
- &F12
-
-
- ALV_STATUS
- &F15
-
-
- ALV_STATUS
- &IC1
-
-
- ALV_STATUS
- &ILD
-
-
- ALV_STATUS
- &ILT
-
-
- ALV_STATUS
- &LFO
-
-
- ALV_STATUS
- &NFO
-
-
- ALV_STATUS
- &NTE
-
-
- ALV_STATUS
- &OAD
-
-
- ALV_STATUS
- &ODN
-
-
- ALV_STATUS
- &OL0
-
-
- ALV_STATUS
- &OMP
-
-
- ALV_STATUS
- &OUP
-
-
- ALV_STATUS
- &RNT
-
-
- ALV_STATUS
- &RNT_PREV
-
-
- ALV_STATUS
- &SAL
-
-
- ALV_STATUS
- &SUM
-
-
- ALV_STATUS
- &UMC
-
-
- ALV_STATUS
- &XML
-
-
- ALV_STATUS
- &XPA
-
-
- ALV_STATUS
- &XXL
-
-
- ALV_STATUS
- EXCEL
-
-
- ALV_STATUS
- P
-
-
- ALV_STATUS
- P+
-
-
- ALV_STATUS
- P++
-
-
- ALV_STATUS
- P-
-
-
- ALV_STATUS
- P--
-
-
-
-
- A
- 000001
- D
- Standard for General List Output
-
-
- P
- 000001
- D
- Standard for General List Output
-
-
- B
- 000001
- 0001
- D
- Standard for General List Output
-
-
-
-
- -
- R
- abap2xlsx Demo: Test Excel Reader (Now in ZDEMO_EXCEL15)
- 56
-
-
-
-
-
diff --git a/src/demos/zdemo_excel27.prog.abap b/src/demos/zdemo_excel27.prog.abap
deleted file mode 100644
index 8ffbeb1..0000000
--- a/src/demos/zdemo_excel27.prog.abap
+++ /dev/null
@@ -1,229 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL27
-*& Test Styles for ABAP2XLSX
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel27.
-
-CLASS lcl_app DEFINITION.
- PUBLIC SECTION.
- METHODS main
- RAISING
- zcx_excel.
- PRIVATE SECTION.
- METHODS conditional_formatting_cellis
- IMPORTING
- column TYPE simple
- row TYPE zexcel_cell_row
- rule TYPE zexcel_condition_rule
- op TYPE zexcel_condition_operator
- f TYPE zexcel_style_formula
- f2 TYPE zexcel_style_formula
- numfmt TYPE string
- RAISING
- zcx_excel.
- METHODS conditional_formatting_textfun
- IMPORTING
- column TYPE simple
- row TYPE zexcel_cell_row
- txtfun TYPE zcl_excel_style_cond=>tv_textfunction
- text TYPE string
- numfmt TYPE string
- RAISING
- zcx_excel.
-ENDCLASS.
-
-CONSTANTS: c_fish TYPE string VALUE 'Fish'.
-
-DATA: lo_app TYPE REF TO lcl_app.
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_range TYPE REF TO zcl_excel_range,
- lo_data_validation TYPE REF TO zcl_excel_data_validation,
- lo_style_1 TYPE REF TO zcl_excel_style,
- lo_style_2 TYPE REF TO zcl_excel_style,
- lv_style_1_guid TYPE zexcel_cell_style,
- lv_style_2_guid TYPE zexcel_cell_style,
- lv_style_guid TYPE zexcel_cell_style,
- ls_cellis TYPE zexcel_conditional_cellis,
- ls_textfunction TYPE zcl_excel_style_cond=>ts_conditional_textfunction.
-
-
-DATA: lv_title TYPE zexcel_sheet_title.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '27_ConditionalFormatting.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
- DATA: lo_error TYPE REF TO zcx_excel,
- lv_message TYPE string.
-
- CREATE OBJECT lo_app.
- TRY.
- lo_app->main( ).
- CATCH zcx_excel INTO lo_error.
- lv_message = lo_error->get_text( ).
- MESSAGE lv_message TYPE 'I' DISPLAY LIKE 'E'.
- ENDTRY.
-
-
-CLASS lcl_app IMPLEMENTATION.
-
- METHOD main.
-
- DATA:
- lo_style_cond TYPE REF TO zcl_excel_style_cond,
- lo_style TYPE REF TO zcl_excel_style.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- lo_style_1 = lo_excel->add_new_style( ).
- lo_style_1->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_1->fill->bgcolor-rgb = zcl_excel_style_color=>c_green.
- lv_style_1_guid = lo_style_1->get_guid( ).
-
- lo_style_2 = lo_excel->add_new_style( ).
- lo_style_2->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_2->fill->bgcolor-rgb = zcl_excel_style_color=>c_red.
- lv_style_2_guid = lo_style_2->get_guid( ).
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lv_title = 'Conditional formatting'.
- lo_worksheet->set_title( lv_title ).
- " Set values for dropdown
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'A' ip_value = c_fish ).
- lo_worksheet->set_cell( ip_row = 4 ip_column = 'A' ip_value = 'Anchovy' ).
- lo_worksheet->set_cell( ip_row = 5 ip_column = 'A' ip_value = 'Carp' ).
- lo_worksheet->set_cell( ip_row = 6 ip_column = 'A' ip_value = 'Catfish' ).
- lo_worksheet->set_cell( ip_row = 7 ip_column = 'A' ip_value = 'Cod' ).
- lo_worksheet->set_cell( ip_row = 8 ip_column = 'A' ip_value = 'Eel' ).
- lo_worksheet->set_cell( ip_row = 9 ip_column = 'A' ip_value = 'Haddock' ).
-
- lo_range = lo_excel->add_new_range( ).
- lo_range->name = c_fish.
- lo_range->set_value( ip_sheet_name = lv_title
- ip_start_column = 'A'
- ip_start_row = 4
- ip_stop_column = 'A'
- ip_stop_row = 9 ).
-
- " 1st validation
- lo_data_validation = lo_worksheet->add_new_data_validation( ).
- lo_data_validation->type = zcl_excel_data_validation=>c_type_list.
- lo_data_validation->formula1 = c_fish.
- lo_data_validation->cell_row = 2.
- lo_data_validation->cell_column = 'C'.
- lo_worksheet->set_cell( ip_row = 2 ip_column = 'C' ip_value = 'Select a value' ).
-
- lo_style_cond = lo_worksheet->add_new_style_cond( ).
- lo_style_cond->rule = zcl_excel_style_cond=>c_rule_cellis.
- ls_cellis-formula = '"Anchovy"'.
- ls_cellis-operator = zcl_excel_style_cond=>c_operator_equal.
- ls_cellis-cell_style = lv_style_1_guid.
- lo_style_cond->mode_cellis = ls_cellis.
- lo_style_cond->priority = 1.
- lo_style_cond->set_range( ip_start_column = 'C'
- ip_start_row = 2
- ip_stop_column = 'C'
- ip_stop_row = 2 ).
-
- lo_style_cond = lo_worksheet->add_new_style_cond( ).
- lo_style_cond->rule = zcl_excel_style_cond=>c_rule_cellis.
- ls_cellis-formula = '"Carp"'.
- ls_cellis-operator = zcl_excel_style_cond=>c_operator_equal.
- ls_cellis-cell_style = lv_style_2_guid.
- lo_style_cond->mode_cellis = ls_cellis.
- lo_style_cond->priority = 2.
- lo_style_cond->set_range( ip_start_column = 'C'
- ip_start_row = 2
- ip_stop_column = 'C'
- ip_stop_row = 2 ).
-
- " Conditional formatting for all operators
- conditional_formatting_cellis( column = 'C' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_equal f = '="Anchovy"' f2 = '' numfmt = 'equal to Anchovy' ).
- conditional_formatting_cellis( column = 'C' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_equal f = '="Anchovy"' f2 = '' numfmt = 'equal to Anchovy' ).
- conditional_formatting_cellis( column = 'D' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_notequal f = '="Anchovy"' f2 = '' numfmt = 'not equal to Anchovy' ).
- conditional_formatting_cellis( column = 'E' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_between f = '="B"' f2 = '="CC"' numfmt = 'between B and CC' ).
- conditional_formatting_cellis( column = 'F' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_greaterthan f = '="Catfish"' f2 = '' numfmt = 'greater than Catfish' ).
- conditional_formatting_cellis( column = 'G' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_greaterthanorequal f = '="Catfish"' f2 = '' numfmt = 'greater than or equal to Catfish' ).
- conditional_formatting_cellis( column = 'H' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_lessthan f = '="Catfish"' f2 = '' numfmt = 'less than Catfish' ).
- conditional_formatting_cellis( column = 'I' row = 4 rule = zcl_excel_style_cond=>c_rule_cellis op = zcl_excel_style_cond=>c_operator_lessthanorequal f = '="Catfish"' f2 = '' numfmt = 'less than or equal to Catfish' ).
-
- " Conditional formatting for all text functions
- conditional_formatting_textfun( column = 'C' row = 6 txtfun = zcl_excel_style_cond=>c_textfunction_beginswith text = 'A' numfmt = 'begins with A' ).
- conditional_formatting_textfun( column = 'D' row = 6 txtfun = zcl_excel_style_cond=>c_textfunction_containstext text = 'h' numfmt = 'contains text h' ).
- conditional_formatting_textfun( column = 'E' row = 6 txtfun = zcl_excel_style_cond=>c_textfunction_endswith text = 'p' numfmt = 'ends with p' ).
- conditional_formatting_textfun( column = 'F' row = 6 txtfun = zcl_excel_style_cond=>c_textfunction_notcontains text = 'h' numfmt = 'not contains h' ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
-
- ENDMETHOD.
-
-
- METHOD conditional_formatting_cellis.
-
- DATA:
- lo_style TYPE REF TO zcl_excel_style,
- lo_style_cond TYPE REF TO zcl_excel_style_cond.
-
- lo_style = lo_excel->add_new_style( ).
- lo_style->font->color-rgb = zcl_excel_style_color=>c_white.
- lo_style->number_format->format_code = '@\ "' && numfmt && '"'.
- lo_style->alignment->wraptext = abap_true.
- lv_style_guid = lo_style->get_guid( ).
-
- lo_worksheet->set_cell( ip_row = row ip_column = column ip_formula = '$C$2' ip_style = lv_style_guid ).
-
- lo_style_cond = lo_worksheet->add_new_style_cond( ).
- lo_style_cond->rule = rule.
- ls_cellis-operator = op.
- ls_cellis-formula = f.
- ls_cellis-formula2 = f2.
- ls_cellis-cell_style = lv_style_1_guid.
- lo_style_cond->mode_cellis = ls_cellis.
- lo_style_cond->priority = 1.
- lo_style_cond->set_range( ip_start_column = column
- ip_start_row = row
- ip_stop_column = column
- ip_stop_row = row ).
-
- ENDMETHOD.
-
-
- METHOD conditional_formatting_textfun.
-
- DATA:
- lo_style TYPE REF TO zcl_excel_style,
- lo_style_cond TYPE REF TO zcl_excel_style_cond.
-
- lo_style = lo_excel->add_new_style( ).
- lo_style->font->color-rgb = zcl_excel_style_color=>c_white.
- lo_style->number_format->format_code = '@\ "' && numfmt && '"'.
- lo_style->alignment->wraptext = abap_true.
- lv_style_guid = lo_style->get_guid( ).
-
- lo_worksheet->set_cell( ip_row = row ip_column = column ip_formula = '$C$2' ip_style = lv_style_guid ).
-
- lo_style_cond = lo_worksheet->add_new_style_cond( ).
- lo_style_cond->rule = zcl_excel_style_cond=>c_rule_textfunction.
- ls_textfunction-textfunction = txtfun.
- ls_textfunction-text = text.
- ls_textfunction-cell_style = lv_style_1_guid.
- lo_style_cond->mode_textfunction = ls_textfunction.
- lo_style_cond->priority = 1.
- lo_style_cond->set_range( ip_start_column = column
- ip_start_row = row
- ip_stop_column = column
- ip_stop_row = row ).
-
- ENDMETHOD.
-
-
-ENDCLASS.
diff --git a/src/demos/zdemo_excel27.prog.xml b/src/demos/zdemo_excel27.prog.xml
deleted file mode 100644
index df5b9d2..0000000
--- a/src/demos/zdemo_excel27.prog.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL27
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Data conditional formatting with styles
- 56
-
- -
- S
- P_PATH
- .
- 24
- D
-
- -
- S
- P_READER
- Write back after using Reader
- 37
-
-
-
-
-
diff --git a/src/demos/zdemo_excel28.prog.abap b/src/demos/zdemo_excel28.prog.abap
deleted file mode 100644
index 2cd4ec0..0000000
--- a/src/demos/zdemo_excel28.prog.abap
+++ /dev/null
@@ -1,105 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL28
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel28.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_excel_writer TYPE REF TO zif_excel_writer,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS: lv_default_file_name TYPE string VALUE '28_HelloWorld.csv'.
-
-PARAMETERS: p_path TYPE string.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
-
- cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = p_path
- CHANGING selected_folder = p_path ).
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
-
-START-OF-SELECTION.
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
- CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet1' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = sy-datum ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = sy-uzeit ).
-
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_width( 11 ).
-
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet2' ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'This is the second sheet' ).
-
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_csv.
- zcl_excel_writer_csv=>set_delimiter( ip_value = cl_abap_char_utilities=>horizontal_tab ).
- zcl_excel_writer_csv=>set_enclosure( ip_value = '''' ).
- zcl_excel_writer_csv=>set_endofline( ip_value = cl_abap_char_utilities=>cr_lf ).
-
- zcl_excel_writer_csv=>set_active_sheet_index( i_active_worksheet = 2 ).
-
- lv_file = lo_excel_writer->write_file( lo_excel ).
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- REPLACE FIRST OCCURRENCE OF '.csv' IN lv_full_path WITH '_Sheet2.csv'.
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = lv_full_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
-
- zcl_excel_writer_csv=>set_active_sheet_index_by_name( i_worksheet_name = 'Sheet1' ).
- lv_file = lo_excel_writer->write_file( lo_excel ).
- REPLACE FIRST OCCURRENCE OF '_Sheet2.csv' IN lv_full_path WITH '_Sheet1.csv'.
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = lv_full_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
diff --git a/src/demos/zdemo_excel28.prog.xml b/src/demos/zdemo_excel28.prog.xml
deleted file mode 100644
index 88151f5..0000000
--- a/src/demos/zdemo_excel28.prog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL28
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: export in CSV
- 29
-
-
-
-
-
diff --git a/src/demos/zdemo_excel29.prog.abap b/src/demos/zdemo_excel29.prog.abap
deleted file mode 100644
index c5a092d..0000000
--- a/src/demos/zdemo_excel29.prog.abap
+++ /dev/null
@@ -1,163 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL29
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel29.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_excel_writer TYPE REF TO zif_excel_writer,
- lo_excel_reader TYPE REF TO zif_excel_reader.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_filename TYPE string,
- lv_workdir TYPE string.
-DATA: lv_separator TYPE c LENGTH 1.
-
-SELECTION-SCREEN COMMENT /1(83) p_text1.
-SELECTION-SCREEN COMMENT /1(83) p_text2.
-SELECTION-SCREEN SKIP 1.
-
-PARAMETERS: p_smw0 RADIOBUTTON GROUP rad1 DEFAULT 'X'.
-PARAMETERS: p_objid TYPE w3objid OBLIGATORY DEFAULT 'ZDEMO_EXCEL29_INPUT'.
-
-PARAMETERS: p_file RADIOBUTTON GROUP rad1.
-PARAMETERS: p_path TYPE zexcel_export_dir.
-
-LOAD-OF-PROGRAM.
- p_text1 = 'abap2xlsx works with VBA macro by using an existing VBA binary.'.
- p_text2 = '(we do not want to create a VBA editor).'.
-
-AT SELECTION-SCREEN OUTPUT.
- IF p_path IS INITIAL.
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
- cl_gui_cfw=>flush( ).
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_separator ).
- p_path = lv_workdir && lv_separator && 'TestMacro.xlsm'.
- ENDIF.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
-
- DATA: lt_filetable TYPE filetable,
- lv_rc TYPE i.
-
- CALL METHOD cl_gui_frontend_services=>file_open_dialog
- EXPORTING
- window_title = 'Select Macro-Enabled Workbook template'
- default_extension = '*.xlsm'
- file_filter = 'Excel Macro-Enabled Workbook (*.xlsm)|*.xlsm'
- initial_directory = lv_workdir
- CHANGING
- file_table = lt_filetable
- rc = lv_rc
- EXCEPTIONS
- file_open_dialog_failed = 1
- cntl_error = 2
- error_no_gui = 3
- not_supported_by_gui = 4
- OTHERS = 5.
- IF sy-subrc <> 0.
- MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
- WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- ENDIF.
- READ TABLE lt_filetable INTO lv_filename INDEX 1.
- p_path = lv_filename.
-
-START-OF-SELECTION.
-
- lv_full_path = p_path.
-
- CREATE OBJECT lo_excel_reader TYPE zcl_excel_reader_xlsm.
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_xlsm.
-* load template
- IF p_file IS NOT INITIAL.
- lo_excel = lo_excel_reader->load_file( lv_full_path ).
- ELSE.
- PERFORM load_smw0 USING lo_excel_reader p_objid CHANGING lo_excel.
- ENDIF.
- lv_file = lo_excel_writer->write_file( lo_excel ).
- REPLACE '.xlsm' IN lv_full_path WITH 'FromReader.xlsm'.
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = lv_full_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
-
-FORM load_smw0
- USING
- io_reader TYPE REF TO zif_excel_reader
- iv_w3objid TYPE w3objid
- CHANGING
- ro_excel TYPE REF TO zcl_excel
- RAISING
- zcx_excel.
-
- DATA: lv_excel_data TYPE xstring,
- lt_mime TYPE TABLE OF w3mime,
- ls_key TYPE wwwdatatab,
- lv_errormessage TYPE string,
- lv_filesize TYPE i,
- lv_filesizec TYPE c LENGTH 10.
-
-*--------------------------------------------------------------------*
-* Read file into binary string
-*--------------------------------------------------------------------*
-
- ls_key-relid = 'MI'.
- ls_key-objid = iv_w3objid .
-
- CALL FUNCTION 'WWWDATA_IMPORT'
- EXPORTING
- key = ls_key
- TABLES
- mime = lt_mime
- EXCEPTIONS
- OTHERS = 1.
- IF sy-subrc <> 0.
- lv_errormessage = 'A problem occured when reading the MIME object'(004).
- zcx_excel=>raise_text( lv_errormessage ).
- ENDIF.
-
- CALL FUNCTION 'WWWPARAMS_READ'
- EXPORTING
- relid = ls_key-relid
- objid = ls_key-objid
- name = 'filesize'
- IMPORTING
- value = lv_filesizec.
-
- lv_filesize = lv_filesizec.
- CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
- EXPORTING
- input_length = lv_filesize
- IMPORTING
- buffer = lv_excel_data
- TABLES
- binary_tab = lt_mime
- EXCEPTIONS
- failed = 1
- OTHERS = 2.
-
-*--------------------------------------------------------------------*
-* Parse Excel data into ZCL_EXCEL object from binary string
-*--------------------------------------------------------------------*
- ro_excel = io_reader->load( i_excel2007 = lv_excel_data ).
-
-ENDFORM.
diff --git a/src/demos/zdemo_excel29.prog.xml b/src/demos/zdemo_excel29.prog.xml
deleted file mode 100644
index 70525a5..0000000
--- a/src/demos/zdemo_excel29.prog.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL29
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Macro-Enabled workbook
- 38
-
- -
- S
- P_FILE
- Load template from file
- 31
-
- -
- S
- P_OBJID
- Object ID
- 17
-
- -
- S
- P_PATH
- Macro-enabled Workbook
- 30
-
- -
- S
- P_SMW0
- Load template from SMW0
- 31
-
-
-
-
-
diff --git a/src/demos/zdemo_excel3.prog.abap b/src/demos/zdemo_excel3.prog.abap
deleted file mode 100644
index 1c4f24e..0000000
--- a/src/demos/zdemo_excel3.prog.abap
+++ /dev/null
@@ -1,198 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL3
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel3.
-
-TYPES: ty_sflight_lines TYPE TABLE OF sflight,
- ty_scarr_lines TYPE TABLE OF scarr.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column.
-
-DATA: ls_table_settings TYPE zexcel_s_table_settings.
-
-
-DATA: lv_title TYPE zexcel_sheet_title,
- lt_carr TYPE ty_scarr_lines,
- row TYPE zexcel_cell_row VALUE 2,
- ls_error TYPE zcl_excel_worksheet=>mty_s_ignored_errors,
- lt_error TYPE zcl_excel_worksheet=>mty_th_ignored_errors,
- lo_range TYPE REF TO zcl_excel_range.
-DATA: lo_data_validation TYPE REF TO zcl_excel_data_validation.
-FIELD-SYMBOLS: LIKE LINE OF lt_carr.
-
-CONSTANTS: c_airlines TYPE string VALUE 'Airlines'.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '03_iTab.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-PARAMETERS: p_empty TYPE flag.
-PARAMETERS: p_checkr NO-DISPLAY TYPE abap_bool.
-
-START-OF-SELECTION.
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Internal table' ).
-
- DATA lt_test TYPE ty_sflight_lines.
-
- IF p_empty <> abap_true.
- IF p_checkr = abap_true.
- PERFORM load_fixed_data_for_checker CHANGING lt_test.
- ELSE.
- SELECT * FROM sflight INTO TABLE lt_test. "#EC CI_NOWHERE
- ENDIF.
- ENDIF.
-
- ls_table_settings-table_style = zcl_excel_table=>builtinstyle_medium2.
- ls_table_settings-show_row_stripes = abap_true.
- ls_table_settings-nofilters = abap_true.
-
- lo_worksheet->bind_table( ip_table = lt_test
- is_table_settings = ls_table_settings ).
-
- IF p_checkr = abap_true.
- PERFORM set_column_headers USING lo_worksheet
- 'Airline;Flight Number;Date;Airfare;Airline Currency;Plane Type;Max. capacity econ.;Occupied econ.;Total;Max. capacity bus.;Occupied bus.;Max. capacity 1st;Occupied 1st'.
- ENDIF.
-
- lo_worksheet->freeze_panes( ip_num_rows = 3 ). "freeze column headers when scrolling
- IF lines( lt_test ) >= 1.
- ls_error-cell_coords = |B2:B{ lines( lt_test ) + 1 }|.
- ls_error-number_stored_as_text = abap_true.
- INSERT ls_error INTO TABLE lt_error.
- lo_worksheet->set_ignored_errors( lt_error ).
- ENDIF.
-
- lo_column = lo_worksheet->get_column( ip_column = 'E' ). "make date field a bit wider
- lo_column->set_width( ip_width = 11 ).
- " Add another table for data validations
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lv_title = 'Data Validation'.
- lo_worksheet->set_title( lv_title ).
- lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = c_airlines ).
- IF p_checkr = abap_true.
- PERFORM load_scarr_data_for_checker CHANGING lt_carr.
- ELSE.
- SELECT * FROM scarr INTO TABLE lt_carr. "#EC CI_NOWHERE
- ENDIF.
- LOOP AT lt_carr ASSIGNING .
- lo_worksheet->set_cell( ip_row = row ip_column = 'A' ip_value = -carrid ).
- row = row + 1.
- ENDLOOP.
- row = row - 1.
- lo_range = lo_excel->add_new_range( ).
- lo_range->name = c_airlines.
- lo_range->set_value( ip_sheet_name = lv_title
- ip_start_column = 'A'
- ip_start_row = 2
- ip_stop_column = 'A'
- ip_stop_row = row ).
- " Set Data Validation
- lo_excel->set_active_sheet_index( 1 ).
- lo_worksheet = lo_excel->get_active_worksheet( ).
-
- lo_data_validation = lo_worksheet->add_new_data_validation( ).
- lo_data_validation->type = zcl_excel_data_validation=>c_type_list.
- lo_data_validation->formula1 = c_airlines.
- lo_data_validation->cell_row = 4.
- lo_data_validation->cell_column = 'C'.
-
-*** Create output
- lcl_output=>output( lo_excel ).
-
-
-
-FORM load_fixed_data_for_checker CHANGING ct_test TYPE ty_sflight_lines.
- DATA: lt_lines TYPE TABLE OF string.
-
- APPEND 'AA;0017;20171219; 422;USD;747-400 ;385;371;191334;31;28;21;21' TO lt_lines.
- APPEND 'AA;0017;20180309; 422;USD;747-400 ;385;365;189984;31;29;21;20' TO lt_lines.
- APPEND 'AA;0017;20180528; 422;USD;747-400 ;385;374;193482;31;30;21;20' TO lt_lines.
- APPEND 'AA;0017;20180816; 422;USD;747-400 ;385;372;193127;31;30;21;20' TO lt_lines.
- APPEND 'AA;0017;20181104; 422;USD;747-400 ;385; 44; 23908;31; 4;21; 3' TO lt_lines.
- APPEND 'AA;0017;20190123; 422;USD;747-400 ;385; 40; 20347;31; 3;21; 2' TO lt_lines.
- APPEND 'AZ;0555;20171219; 185;EUR;737-800 ;140;133; 32143;12;12;10;10' TO lt_lines.
- APPEND 'AZ;0555;20180309; 185;EUR;737-800 ;140;137; 32595;12;12;10;10' TO lt_lines.
- APPEND 'AZ;0555;20180528; 185;EUR;737-800 ;140;134; 31899;12;11;10;10' TO lt_lines.
- APPEND 'AZ;0555;20180816; 185;EUR;737-800 ;140;128; 29775;12;10;10; 9' TO lt_lines.
- APPEND 'AZ;0555;20181104; 185;EUR;737-800 ;140; 0; 0;12; 0;10; 0' TO lt_lines.
- APPEND 'AZ;0555;20190123; 185;EUR;737-800 ;140; 23; 5392;12; 1;10; 2' TO lt_lines.
- APPEND 'AZ;0789;20171219;1030;EUR;767-200 ;260;250;307176;21;20;11;11' TO lt_lines.
- APPEND 'AZ;0789;20180309;1030;EUR;767-200 ;260;252;306054;21;20;11;10' TO lt_lines.
- APPEND 'AZ;0789;20180528;1030;EUR;767-200 ;260;252;307063;21;20;11;10' TO lt_lines.
- APPEND 'AZ;0789;20180816;1030;EUR;767-200 ;260;249;300739;21;19;11;10' TO lt_lines.
- APPEND 'AZ;0789;20181104;1030;EUR;767-200 ;260;104;127647;21; 8;11; 5' TO lt_lines.
- APPEND 'AZ;0789;20190123;1030;EUR;767-200 ;260; 18; 22268;21; 1;11; 1' TO lt_lines.
- APPEND 'DL;0106;20171217; 611;USD;A380-800;475;458;324379;30;29;20;20' TO lt_lines.
- APPEND 'DL;0106;20180307; 611;USD;A380-800;475;458;324330;30;30;20;20' TO lt_lines.
- APPEND 'DL;0106;20180526; 611;USD;A380-800;475;459;328149;30;29;20;20' TO lt_lines.
- APPEND 'DL;0106;20180814; 611;USD;A380-800;475;462;326805;30;30;20;18' TO lt_lines.
- APPEND 'DL;0106;20181102; 611;USD;A380-800;475;167;115554;30;10;20; 6' TO lt_lines.
- APPEND 'DL;0106;20190121; 611;USD;A380-800;475; 11; 9073;30; 1;20; 1' TO lt_lines.
-
- PERFORM load_data USING lt_lines CHANGING ct_test.
-ENDFORM.
-
-FORM load_scarr_data_for_checker CHANGING ct_scarr TYPE ty_scarr_lines.
- DATA: lt_lines TYPE TABLE OF string.
-
- APPEND 'AA;American Airlines;USD;http://www.aa.com ' TO lt_lines.
- APPEND 'AZ;Alitalia ;EUR;http://www.alitalia.it ' TO lt_lines.
- APPEND 'DL;Delta Airlines ;USD;http://www.delta-air.com' TO lt_lines.
-
- PERFORM load_data USING lt_lines CHANGING ct_scarr.
-ENDFORM.
-
-FORM load_data USING it_data TYPE table CHANGING ct_data TYPE table.
- DATA: lv_line TYPE string,
- lt_fields TYPE TABLE OF string,
- lv_comp TYPE i,
- lv_field TYPE string,
- lv_ref_line TYPE REF TO data.
- FIELD-SYMBOLS:
- TYPE simple,
- TYPE any.
-
- CREATE DATA lv_ref_line LIKE LINE OF ct_data.
- ASSIGN lv_ref_line->* TO .
-
- LOOP AT it_data INTO lv_line.
- CLEAR .
- SPLIT lv_line AT ';' INTO TABLE lt_fields.
- lv_comp = 2.
- LOOP AT lt_fields INTO lv_field.
- ASSIGN COMPONENT lv_comp OF STRUCTURE TO .
- = lv_field.
- lv_comp = lv_comp + 1.
- ENDLOOP.
- APPEND TO ct_data.
- ENDLOOP.
-ENDFORM.
-
-FORM set_column_headers
- USING io_worksheet TYPE REF TO zcl_excel_worksheet
- iv_headers TYPE csequence
- RAISING zcx_excel.
-
- DATA: lt_headers TYPE TABLE OF string,
- lv_header TYPE string,
- lv_tabix TYPE i.
-
- SPLIT iv_headers AT ';' INTO TABLE lt_headers.
- LOOP AT lt_headers INTO lv_header.
- lv_tabix = sy-tabix.
- io_worksheet->set_cell( ip_row = 1 ip_column = lv_tabix ip_value = lv_header ).
- ENDLOOP.
-
-ENDFORM.
diff --git a/src/demos/zdemo_excel3.prog.xml b/src/demos/zdemo_excel3.prog.xml
deleted file mode 100644
index bb1a054..0000000
--- a/src/demos/zdemo_excel3.prog.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL3
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Export internal table
- 38
-
- -
- S
- P_EMPTY
- Leave Table Empty
- 25
-
- -
- S
- P_PATH
- .
- 24
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel30.prog.abap b/src/demos/zdemo_excel30.prog.abap
deleted file mode 100644
index d36baf8..0000000
--- a/src/demos/zdemo_excel30.prog.abap
+++ /dev/null
@@ -1,96 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL1
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel30.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
- lo_column TYPE REF TO zcl_excel_column.
-
-
-DATA: lv_value TYPE string,
- lv_count TYPE i VALUE 10,
- lv_packed TYPE p LENGTH 16 DECIMALS 1 VALUE '1234567890.5'.
-
-CONSTANTS: lc_typekind_string TYPE abap_typekind VALUE cl_abap_typedescr=>typekind_string,
- lc_typekind_packed TYPE abap_typekind VALUE cl_abap_typedescr=>typekind_packed,
- lc_typekind_num TYPE abap_typekind VALUE cl_abap_typedescr=>typekind_num,
- lc_typekind_date TYPE abap_typekind VALUE cl_abap_typedescr=>typekind_date,
- lc_typekind_s_ls TYPE string VALUE 's_leading_blanks'.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '30_CellDataTypes.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Cell data types' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Number as String'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 2 ip_value = '11'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 1 ip_value = 'String'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = ' String with leading spaces'
- ip_data_type = lc_typekind_s_ls ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = ' Negative Value'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 1 ip_value = 'Packed'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 2 ip_value = '50000.01-'
- ip_abap_type = lc_typekind_packed ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 1 ip_value = 'Number with Percentage'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 2 ip_value = '0 %'
- ip_abap_type = lc_typekind_num ).
- lo_worksheet->set_cell( ip_column = 'E' ip_row = 1 ip_value = 'Date'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'E' ip_row = 2 ip_value = '20110831'
- ip_abap_type = lc_typekind_date ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = 'Positive Value'
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = '5000.02'
- ip_abap_type = lc_typekind_packed ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 3 ip_value = '50 %'
- ip_abap_type = lc_typekind_num ).
-
- WHILE lv_count <= 15.
- lv_value = lv_count.
- CONCATENATE 'Positive Value with' lv_value 'Digits' INTO lv_value SEPARATED BY space.
- lo_worksheet->set_cell( ip_column = 'B' ip_row = lv_count ip_value = lv_value
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = lv_count ip_value = lv_packed
- ip_abap_type = lc_typekind_packed ).
- CONCATENATE 'Positive Value with' lv_value 'Digits formated as string' INTO lv_value SEPARATED BY space.
- lo_worksheet->set_cell( ip_column = 'D' ip_row = lv_count ip_value = lv_value
- ip_abap_type = lc_typekind_string ).
- lo_worksheet->set_cell( ip_column = 'E' ip_row = lv_count ip_value = lv_packed
- ip_abap_type = lc_typekind_string ).
- lv_packed = lv_packed * 10.
- lv_count = lv_count + 1.
- ENDWHILE.
-
- lo_column = lo_worksheet->get_column( ip_column = 'A' ).
- lo_column->set_auto_size( abap_true ).
- lo_column = lo_worksheet->get_column( ip_column = 'B' ).
- lo_column->set_auto_size( abap_true ).
- lo_column = lo_worksheet->get_column( ip_column = 'C' ).
- lo_column->set_auto_size( abap_true ).
- lo_column = lo_worksheet->get_column( ip_column = 'D' ).
- lo_column->set_auto_size( abap_true ).
- lo_column = lo_worksheet->get_column( ip_column = 'E' ).
- lo_column->set_auto_size( abap_true ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel30.prog.xml b/src/demos/zdemo_excel30.prog.xml
deleted file mode 100644
index c686fa3..0000000
--- a/src/demos/zdemo_excel30.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL30
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: ABAP Cell data types
- 37
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel31.prog.abap b/src/demos/zdemo_excel31.prog.abap
deleted file mode 100644
index dfcae8e..0000000
--- a/src/demos/zdemo_excel31.prog.abap
+++ /dev/null
@@ -1,160 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL1
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel31.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
- lo_column TYPE REF TO zcl_excel_column.
-
-
-DATA: fieldval TYPE text80,
- row TYPE i,
- style_column_a TYPE REF TO zcl_excel_style,
- style_column_a_guid TYPE zexcel_cell_style,
- style_column_b TYPE REF TO zcl_excel_style,
- style_column_b_guid TYPE zexcel_cell_style,
- style_column_c TYPE REF TO zcl_excel_style,
- style_column_c_guid TYPE zexcel_cell_style,
- style_font TYPE REF TO zcl_excel_style_font.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '31_AutosizeWithDifferentFontSizes.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
-
- CREATE OBJECT lo_excel.
- " Use active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Regular Font' ).
-
- style_column_a = lo_excel->add_new_style( ).
- style_column_a->font->size = 32. " quite large
- style_column_a_guid = style_column_a->get_guid( ).
-
- style_column_c = lo_excel->add_new_style( ).
- style_column_c->font->size = 16. " not so large
- style_column_c_guid = style_column_c->get_guid( ).
-
-
- DO 20 TIMES.
- row = sy-index.
- CLEAR fieldval.
- DO sy-index TIMES.
- CONCATENATE fieldval 'X' INTO fieldval.
- ENDDO.
- lo_worksheet->set_cell( ip_column = 'A' ip_row = row ip_value = fieldval ip_style = style_column_a_guid ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = row ip_value = fieldval ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = row ip_value = fieldval ip_style = style_column_c_guid ).
- ENDDO.
-
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'C' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_worksheet->calculate_column_widths( ).
-
- " Add sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Bold Font' ).
-
- style_column_a = lo_excel->add_new_style( ).
- style_column_a->font->size = 32. " quite large
- style_column_a->font->bold = abap_true.
- style_column_a_guid = style_column_a->get_guid( ).
-
- style_column_b = lo_excel->add_new_style( ).
- style_column_b->font->bold = abap_true.
- style_column_b_guid = style_column_b->get_guid( ).
-
- style_column_c = lo_excel->add_new_style( ).
- style_column_c->font->size = 16. " not so large
- style_column_c->font->bold = abap_true.
- style_column_c_guid = style_column_c->get_guid( ).
-
- DO 20 TIMES.
- row = sy-index.
- CLEAR fieldval.
- DO sy-index TIMES.
- CONCATENATE fieldval 'X' INTO fieldval.
- ENDDO.
- lo_worksheet->set_cell( ip_column = 'A' ip_row = row ip_value = fieldval ip_style = style_column_a_guid ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = row ip_value = fieldval ip_style = style_column_b_guid ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = row ip_value = fieldval ip_style = style_column_c_guid ).
- ENDDO.
-
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'C' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_worksheet->calculate_column_widths( ).
-
- " Add sheet
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Italic Font' ).
-
- style_column_a = lo_excel->add_new_style( ).
- style_column_a->font->size = 32. " quite large
- style_column_a->font->italic = abap_true.
- style_column_a_guid = style_column_a->get_guid( ).
-
- style_column_b = lo_excel->add_new_style( ).
- style_column_b->font->italic = abap_true.
- style_column_b_guid = style_column_b->get_guid( ).
-
- style_column_c = lo_excel->add_new_style( ).
- style_column_c->font->size = 16. " not so large
- style_column_c->font->italic = abap_true.
- style_column_c_guid = style_column_c->get_guid( ).
-
- DO 20 TIMES.
- row = sy-index.
- CLEAR fieldval.
- DO sy-index TIMES.
- CONCATENATE fieldval 'X' INTO fieldval.
- ENDDO.
- lo_worksheet->set_cell( ip_column = 'A' ip_row = row ip_value = fieldval ip_style = style_column_a_guid ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = row ip_value = fieldval ip_style = style_column_b_guid ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = row ip_value = fieldval ip_style = style_column_c_guid ).
- ENDDO.
-
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_column = lo_worksheet->get_column( 'C' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
- lo_worksheet->calculate_column_widths( ).
-
- " Add sheet for merged cells
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Merged cells' ).
-
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'This is a very long header text' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 2 ip_value = 'Some data' ).
- lo_worksheet->set_cell( ip_column = 'A' ip_row = 3 ip_value = 'Some more data' ).
-
- lo_worksheet->set_merge(
- EXPORTING
- ip_column_start = 'A'
- ip_column_end = 'C'
- ip_row = 1 ).
-
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_auto_size( ip_auto_size = abap_true ).
-
- lo_excel->set_active_sheet_index( i_active_worksheet = 1 ).
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel31.prog.xml b/src/demos/zdemo_excel31.prog.xml
deleted file mode 100644
index e11aa28..0000000
--- a/src/demos/zdemo_excel31.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL31
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Autosize Column with different Font sizes
- 58
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel32.prog.abap b/src/demos/zdemo_excel32.prog.abap
deleted file mode 100644
index 0a16bca..0000000
--- a/src/demos/zdemo_excel32.prog.abap
+++ /dev/null
@@ -1,232 +0,0 @@
-*--------------------------------------------------------------------*
-* REPORT ZDEMO_EXCEL32
-* Demo for export options from ALV GRID:
-* export data from ALV (CL_GUI_ALV_GRID) object or cl_salv_table object
-* to Excel.
-*--------------------------------------------------------------------*
-REPORT zdemo_excel32.
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events DEFINITION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events DEFINITION.
- PUBLIC SECTION.
- METHODS:
- on_user_command FOR EVENT added_function OF cl_salv_events
- IMPORTING e_salv_function.
-ENDCLASS. "lcl_handle_events DEFINITION
-
-*----------------------------------------------------------------------*
-* CLASS lcl_handle_events IMPLEMENTATION
-*----------------------------------------------------------------------*
-*
-*----------------------------------------------------------------------*
-CLASS lcl_handle_events IMPLEMENTATION.
- METHOD on_user_command.
- PERFORM user_command." using e_salv_function text-i08.
- ENDMETHOD. "on_user_command
-ENDCLASS. "lcl_handle_events IMPLEMENTATION
-
-*--------------------------------------------------------------------*
-* DATA DECLARATION
-*--------------------------------------------------------------------*
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_salv TYPE REF TO cl_salv_table,
- gr_events TYPE REF TO lcl_handle_events,
- lr_events TYPE REF TO cl_salv_events_table,
- gt_sbook TYPE TABLE OF sbook.
-
-DATA: l_path TYPE string, " local dir
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS:
- lv_default_file_name TYPE string VALUE '32_Export_ALV.xlsx',
- lv_default_file_name2 TYPE string VALUE '32_Export_Convert.xlsx'.
-*--------------------------------------------------------------------*
-*START-OF-SELECTION
-*--------------------------------------------------------------------*
-
-START-OF-SELECTION.
-
-* get data
-* ------------------------------------------
-
- SELECT *
- INTO TABLE gt_sbook[]
- FROM sbook "#EC CI_NOWHERE
- UP TO 100 ROWS.
-
-* Display ALV
-* ------------------------------------------
-
- TRY.
- cl_salv_table=>factory(
- EXPORTING
- list_display = abap_false
- IMPORTING
- r_salv_table = lo_salv
- CHANGING
- t_table = gt_sbook[] ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- TRY.
- lo_salv->set_screen_status(
- EXPORTING
- report = sy-repid
- pfstatus = 'ALV_STATUS'
- set_functions = lo_salv->c_functions_all ).
- CATCH cx_salv_msg .
- ENDTRY.
-
- lr_events = lo_salv->get_event( ).
- CREATE OBJECT gr_events.
- SET HANDLER gr_events->on_user_command FOR lr_events.
-
- lo_salv->display( ).
-
-
-*&---------------------------------------------------------------------*
-*& Form USER_COMMAND
-*&---------------------------------------------------------------------*
-* ALV user command
-*--------------------------------------------------------------------*
-FORM user_command .
- DATA: lo_error TYPE REF TO zcx_excel,
- lv_message TYPE string.
-
-* get save file path
- cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = l_path ).
- cl_gui_cfw=>flush( ).
- cl_gui_frontend_services=>directory_browse(
- EXPORTING initial_folder = l_path
- CHANGING selected_folder = l_path ).
-
- IF l_path IS INITIAL.
- cl_gui_frontend_services=>get_sapgui_workdir(
- CHANGING sapworkdir = lv_workdir ).
- l_path = lv_workdir.
- ENDIF.
-
- cl_gui_frontend_services=>get_file_separator(
- CHANGING file_separator = lv_file_separator ).
-
-
-
-* export file to save file path
- TRY.
- CASE sy-ucomm.
- WHEN 'EXCELBIND'.
- CONCATENATE l_path lv_file_separator lv_default_file_name
- INTO l_path.
- PERFORM export_to_excel_bind.
-
- WHEN 'EXCELCONV'.
-
- CONCATENATE l_path lv_file_separator lv_default_file_name2
- INTO l_path.
- PERFORM export_to_excel_conv.
-
- ENDCASE.
-
- CATCH zcx_excel INTO lo_error.
- lv_message = lo_error->get_text( ).
- MESSAGE lv_message TYPE 'I' DISPLAY LIKE 'E'.
- ENDTRY.
-
-ENDFORM. " USER_COMMAND
-*--------------------------------------------------------------------*
-* FORM EXPORT_TO_EXCEL_CONV
-*--------------------------------------------------------------------*
-* This subroutine is principal demo session
-*--------------------------------------------------------------------*
-FORM export_to_excel_conv RAISING zcx_excel.
- DATA: lo_converter TYPE REF TO zcl_excel_converter.
-
- CREATE OBJECT lo_converter.
- lo_converter->convert(
- EXPORTING
- io_alv = lo_salv
- it_table = gt_sbook
- i_row_int = 2
- i_column_int = 2 ).
- lo_converter->write_file( i_path = l_path ).
-
-ENDFORM. "EXPORT_TO_EXCEL_CONV
-
-*--------------------------------------------------------------------*
-* FORM EXPORT_TO_EXCEL_BIND
-*--------------------------------------------------------------------*
-* This subroutine is principal demo session
-*--------------------------------------------------------------------*
-FORM export_to_excel_bind RAISING zcx_excel.
-* create zcl_excel_worksheet object
- CREATE OBJECT lo_excel.
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Sheet1' ).
-
-* write to excel using method Bin_object
- lo_worksheet->bind_alv(
- io_alv = lo_salv
- it_table = gt_sbook
- i_top = 2
- i_left = 1
- ).
-
- PERFORM write_file.
-
-ENDFORM. "EXPORT_TO_EXCEL_BIND
-*&---------------------------------------------------------------------*
-*& Form WRITE_FILE
-*&---------------------------------------------------------------------*
-* text
-*----------------------------------------------------------------------*
-* --> p1 text
-* <-- p2 text
-*----------------------------------------------------------------------*
-FORM write_file RAISING zcx_excel.
- DATA: lt_file TYPE solix_tab,
- l_bytecount TYPE i,
- l_file TYPE xstring.
-
- DATA: lo_excel_writer TYPE REF TO zif_excel_writer.
-
- DATA: ls_seoclass TYPE seoclass.
-
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
- l_file = lo_excel_writer->write_file( lo_excel ).
-
- SELECT SINGLE * INTO ls_seoclass
- FROM seoclass
- WHERE clsname = 'CL_BCS_CONVERT'.
-
- IF sy-subrc = 0.
- CALL METHOD (ls_seoclass-clsname)=>xstring_to_solix
- EXPORTING
- iv_xstring = l_file
- RECEIVING
- et_solix = lt_file.
-
- l_bytecount = xstrlen( l_file ).
- ELSE.
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = l_file
- IMPORTING
- output_length = l_bytecount
- TABLES
- binary_tab = lt_file.
- ENDIF.
-
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = l_bytecount
- filename = l_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file ).
-
-ENDFORM. " WRITE_FILE
diff --git a/src/demos/zdemo_excel32.prog.xml b/src/demos/zdemo_excel32.prog.xml
deleted file mode 100644
index 40161af..0000000
--- a/src/demos/zdemo_excel32.prog.xml
+++ /dev/null
@@ -1,1941 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL32
- 1
- E
- X
- X
-
-
-
- 000010
- 000010
-
-
-
- ALV_STATUS
- D
- 000001
- 000001
- 0001
- Standard for General List Output
-
-
-
-
- %ML
- 001
- S
- Folder
- F
-
-
- %PC
- 001
- S
- ICON_EXPORT
- @49@
- Local file...
- L
-
-
- %SC
- 001
- S
- ICON_SEARCH
- @13@
- Find
- N
-
-
- %SC+
- 001
- S
- ICON_SEARCH_NEXT
- @4E@
- Find next
-
-
- %SL
- 001
- S
- ICON_MAIL
- @1S@
- Mail recipient
- M
-
-
- &ABC
- 001
- S
- ICON_ABC
- @DL@
- ABC Analysis
- A
-
-
- &ALL
- 001
- S
- ICON_SELECT_ALL
- @4B@
- Select all
- S
-
-
- &AQW
- 001
- S
- ICON_WORD_PROCESSING
- @DK@
- Word processing...
- W
-
-
- &AUF
- 001
- S
- Define Breakdown...
- D
-
-
- &AVE
- 001
- S
- Saving...
- S
-
-
- &AVE
- 002
- S
- ICON_ALV_VARIANT_SAVE
- @DN@
- Save layout...
-
-
- &AVR
- 001
- S
- Mean value
- M
-
-
- &CDF
- 001
- S
- Unfreeze
- U
-
-
- &CFI
- 001
- S
- Freeze to column
- F
-
-
- &COUNT
- 001
- S
- Count
- C
-
-
- &CRB
- 001
- S
- ICON_TOTAL_LEFT
- @0B@
- First Column
-
-
- &CRE
- 001
- S
- ICON_TOTAL_RIGHT
- @0C@
- Last column
-
-
- &CRL
- 001
- S
- ICON_COLUMN_LEFT
- @0D@
- Column left
-
-
- &CRR
- 001
- S
- ICON_COLUMN_RIGHT
- @0E@
- Column right
-
-
- &DAU
- 001
- S
- Automatic Separator
- T
-
-
- &DOF
- 001
- S
- Separator Always Off
- E
-
-
- &DON
- 001
- S
- Separator Always On
- R
-
-
- &EB9
- 001
- S
- ICON_TABLE_SETTINGS
- @36@
- Call Up Report
- C
-
-
- &ELP
- 001
- S
- ICON_SYSTEM_HELP
- @35@
- Help
-
-
- &ERW
- 001
- S
- Layout Management
- L
-
-
- &ETA
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Details
-
-
- &F03
- 001
- S
- Back
- B
-
-
- &F12
- 001
- S
- ICON_CANCEL
- @0W@
- Cancel
- A
-
-
- &F15
- 001
- S
- Exit
- X
-
-
- &IC1
- 001
- S
- ICON_SELECT_DETAIL
- @16@
- Choose
-
-
- &ILD
- 001
- S
- ICON_FILTER_UNDO
- @GD@
- Delete Filter
- L
-
-
- &ILT
- 001
- S
- ICON_FILTER
- @4G@
- Set filter
- F
-
-
- &KOM
- 001
- S
- ICON_COLLAPSE
- @3T@
- Choose...
- C
-
-
- &LFO
- 001
- S
- List status...
- L
-
-
- &LFO
- 002
- S
- ICON_INFORMATION
- @0S@
- List status...
-
-
- &LIS
- 001
- S
- Basic List
- B
-
-
- &MAX
- 001
- S
- Maximum
- A
-
-
- &MIN
- 001
- S
- Minimum
- I
-
-
- &NFO
- 001
- S
- ICON_INFORMATION
- @0S@
- Selections...
- Selections
- E
-
-
- &NTE
- 001
- S
- Refresh
-
-
- &OAD
- 001
- S
- Choose...
- H
-
-
- &OAD
- 002
- S
- ICON_ALV_VARIANT_CHOOSE
- @DM@
- Select layout...
-
-
- &ODN
- 001
- S
- ICON_SORT_DOWN
- @3F@
- Sort in descending order
- O
-
-
- &OL0
- 001
- S
- ICON_ALV_VARIANTS
- @LZ@
- Change layout...
-
-
- &OLX
- 001
- S
- ICON_VARIANTS
- @0R@
- Change...
- C
-
-
- &OMP
- 001
- S
- ICON_COLLAPSE
- @3T@
- Collapse
-
-
- &OPT
- 001
- S
- Optimize width
- P
-
-
- &OUP
- 001
- S
- ICON_SORT_UP
- @3E@
- Sort in Ascending Order
- I
-
-
- &RNT
- 001
- S
- ICON_PRINT
- @0X@
- Print
- P
-
-
- &RNT_PREV
- 001
- S
- ICON_LAYOUT_CONTROL
- @3G@
- Print preview
- R
-
-
- &SAL
- 001
- S
- ICON_DESELECT_ALL
- @4D@
- Deselect all
- D
-
-
- &SUM
- 001
- S
- ICON_INTERMEDIATE_SUM
- @5V@
- Subtotals...
- T
-
-
- &UMC
- 001
- S
- ICON_SUM
- @3Z@
- Total
- T
-
-
- &XINT
- 001
- S
- Additional Functions of SAP Query
- E
-
-
- &XML
- 001
- S
- XML Export...
- X
-
-
- &XPA
- 001
- S
- ICON_EXPAND
- @3S@
- Expand
-
-
- &XXL
- 001
- S
- ICON_XXL
- @DJ@
- Spreadsheet...
- A
-
-
- EXCEL
- 001
- S
- ICON_XLV
- @J3@
- Excel
- Export to Excel
-
-
- EXCELBIND
- 001
- S
- ICON_XLS
- @J2@
- Excel bind
- Excel bind
-
-
- EXCELCELL
- 001
- S
- ICON_XXL
- @DJ@
- Excel converter
-
-
- EXCELCONV
- 001
- S
- @DJ@
- Excel converter
- Excel converter
-
-
- P+
- 001
- S
- Next page
-
-
- P++
- 001
- S
- Last Page
-
-
- P-
- 001
- S
- Previous Page
-
-
- P--
- 001
- S
- First Page
-
-
-
-
- 000001
- 01
- F
- &RNT
- 001
-
-
- 000001
- 02
- M
- 000002
-
-
- 000001
- 03
- M
- 000003
-
-
- 000001
- 04
- S
-
-
- 000001
- 05
- F
- &F15
- 001
-
-
- 000002
- 01
- F
- &AQW
- 001
-
-
- 000002
- 02
- F
- &XXL
- 001
-
-
- 000002
- 03
- F
- %PC
- 001
-
-
- 000002
- 04
- F
- &XINT
- 001
-
-
- 000003
- 01
- F
- %SL
- 001
-
-
- 000003
- 02
- F
- %ML
- 001
-
-
- 000004
- 01
- F
- &ALL
- 001
-
-
- 000004
- 02
- F
- &SAL
- 001
-
-
- 000004
- 03
- S
-
-
- 000004
- 04
- F
- &ILT
- 001
-
-
- 000004
- 05
- F
- &ILD
- 001
-
-
- 000004
- 06
- S
-
-
- 000004
- 07
- F
- &OUP
- 001
-
-
- 000004
- 08
- F
- &ODN
- 001
-
-
- 000004
- 09
- S
-
-
- 000004
- 10
- M
- 000005
-
-
- 000004
- 11
- F
- &SUM
- 001
-
-
- 000004
- 12
- S
-
-
- 000004
- 13
- F
- %SC
- 001
-
-
- 000004
- 14
- S
-
-
- 000004
- 15
- F
- &F12
- 001
-
-
- 000005
- 01
- F
- &UMC
- 001
-
-
- 000005
- 02
- F
- &AVR
- 001
-
-
- 000005
- 03
- F
- &MIN
- 001
-
-
- 000005
- 04
- F
- &MAX
- 001
-
-
- 000005
- 05
- F
- &COUNT
- 001
-
-
- 000006
- 01
- F
- &ABC
- 001
-
-
- 000006
- 02
- S
-
-
- 000006
- 03
- F
- &F03
- 001
-
-
- 000007
- 01
- F
- &LIS
- 001
-
-
- 000007
- 02
- S
-
-
- 000007
- 03
- M
- 000008
-
-
- 000007
- 04
- S
-
-
- 000007
- 05
- M
- 000009
-
-
- 000007
- 06
- S
-
-
- 000007
- 07
- M
- 000010
-
-
- 000007
- 08
- S
-
-
- 000007
- 09
- F
- &NFO
- 001
-
-
- 000007
- 10
- F
- &LFO
- 001
-
-
- 000008
- 01
- F
- &OLX
- 001
-
-
- 000008
- 02
- F
- &OAD
- 001
-
-
- 000008
- 03
- S
-
-
- 000008
- 04
- F
- &AVE
- 001
-
-
- 000008
- 05
- S
-
-
- 000008
- 06
- F
- &ERW
- 001
-
-
- 000009
- 01
- F
- &KOM
- 001
-
-
- 000009
- 02
- F
- &AUF
- 001
-
-
- 000010
- 01
- F
- &OPT
- 001
-
-
- 000010
- 02
- S
-
-
- 000010
- 03
- F
- &CFI
- 001
-
-
- 000010
- 04
- F
- &CDF
- 001
-
-
- 000010
- 05
- S
-
-
- 000010
- 06
- F
- &DAU
- 001
-
-
- 000010
- 07
- F
- &DON
- 001
-
-
- 000010
- 08
- F
- &DOF
- 001
-
-
-
-
- 000001
- S
- List
- L
- STANDARD List
-
-
- 000002
- S
- Export
- E
- STANDARD Save
-
-
- 000003
- S
- Send to
- S
-
-
- 000004
- S
- Edit
- E
- STANDARD
-
-
- 000005
- S
- Calculate
- C
-
-
- 000006
- S
- Goto
- G
- STANDARD
-
-
- 000007
- S
- Settings
- S
- STANDARD
-
-
- 000008
- S
- Layout
- A
- Sub STANDARD
-
-
- 000009
- S
- Summation levels
- S
- Sub STANDARD
-
-
- 000010
- S
- Columns
- C
-
-
-
-
- 000001
- 01
- 000001
-
-
- 000001
- 02
- 000004
-
-
- 000001
- 03
- 000006
-
-
- 000001
- 04
- 000007
-
-
-
-
- 000001
- 0001
- 01
- 39
-
-
- 000001
- 0001
- 02
- 37
-
-
- 000001
- 0001
- 03
- S
-
-
- 000001
- 0001
- 04
- 05
-
-
- 000001
- 0001
- 05
- 06
-
-
- 000001
- 0001
- 06
- S
-
-
- 000001
- 0001
- 07
- 28
-
-
- 000001
- 0001
- 08
- 40
-
-
- 000001
- 0001
- 09
- 29
-
-
- 000001
- 0001
- 10
- 38
-
-
- 000001
- 0001
- 11
- S
-
-
- 000001
- 0001
- 12
- 30
-
-
- 000001
- 0001
- 13
- 42
-
-
- 000001
- 0001
- 14
- S
-
-
- 000001
- 0001
- 15
- 45
-
-
- 000001
- 0001
- 16
- S
-
-
- 000001
- 0001
- 17
- 32
-
-
- 000001
- 0001
- 18
- 33
-
-
- 000001
- 0001
- 19
- 34
-
-
- 000001
- 0001
- 20
- 09
-
-
- 000001
- 0001
- 21
- 13
-
-
- 000001
- 0001
- 22
- S
-
-
- 000001
- 0001
- 23
- 41
-
-
- 000001
- 0001
- 24
- 07
-
-
- 000001
- 0001
- 25
- S
-
-
- 000001
- 0001
- 26
- 18
-
-
- 000001
- 0001
- 27
- 26
-
-
- 000001
- 0001
- 28
- 27
-
-
- 000001
- 0001
- 29
- 19
-
-
-
-
- 000001
- 01
- &ELP
- 001
-
-
- 000001
- 02
- &IC1
- 001
-
-
- 000001
- 03
- &F03
- 001
-
-
- 000001
- 05
- &ALL
- 001
-
-
- 000001
- 06
- &SAL
- 001
-
-
- 000001
- 07
- &NFO
- 001
-
-
- 000001
- 08
- &NTE
- 001
-
-
- 000001
- 09
- EXCELBIND
- 001
-
-
- 000001
- 12
- &F12
- 001
-
-
- 000001
- 13
- EXCELCONV
- 001
-
-
- 000001
- 15
- &F15
- 001
-
-
- 000001
- 18
- &CRB
- 001
-
-
- 000001
- 19
- &CRE
- 001
-
-
- 000001
- 21
- P--
- 001
-
-
- 000001
- 22
- P-
- 001
-
-
- 000001
- 23
- P+
- 001
-
-
- 000001
- 24
- P++
- 001
-
-
- 000001
- 25
- &ABC
- 001
-
-
- 000001
- 26
- &CRL
- 001
-
-
- 000001
- 27
- &CRR
- 001
-
-
- 000001
- 28
- &OUP
- 001
-
-
- 000001
- 29
- &ILT
- 001
-
-
- 000001
- 30
- &UMC
- 001
-
-
- 000001
- 31
- %SL
- 001
-
-
- 000001
- 32
- &OL0
- 001
-
-
- 000001
- 33
- &OAD
- 002
-
-
- 000001
- 34
- &AVE
- 002
-
-
- 000001
- 35
- &XPA
- 001
-
-
- 000001
- 37
- &EB9
- 001
-
-
- 000001
- 38
- &ILD
- 001
-
-
- 000001
- 39
- &ETA
- 001
-
-
- 000001
- 40
- &ODN
- 001
-
-
- 000001
- 41
- &LFO
- 002
-
-
- 000001
- 42
- &SUM
- 001
-
-
- 000001
- 43
- &XXL
- 001
-
-
- 000001
- 44
- &AQW
- 001
-
-
- 000001
- 45
- %PC
- 001
-
-
- 000001
- 46
- &RNT_PREV
- 001
-
-
- 000001
- 47
- &OMP
- 001
-
-
- 000001
- 48
- &XML
- 001
-
-
- 000001
- 71
- %SC
- 001
-
-
- 000001
- 80
- P--
- 001
-
-
- 000001
- 81
- P-
- 001
-
-
- 000001
- 82
- P+
- 001
-
-
- 000001
- 83
- P++
- 001
-
-
- 000001
- 84
- %SC+
- 001
-
-
- 000001
- 86
- &RNT
- 001
-
-
-
-
- ALV_STATUS
- %CH
-
-
- ALV_STATUS
- %ML
-
-
- ALV_STATUS
- %PC
-
-
- ALV_STATUS
- %SC
-
-
- ALV_STATUS
- %SC+
-
-
- ALV_STATUS
- %SL
-
-
- ALV_STATUS
- &ABC
-
-
- ALV_STATUS
- &ALL
-
-
- ALV_STATUS
- &AQW
-
-
- ALV_STATUS
- &AUF
-
-
- ALV_STATUS
- &AVE
-
-
- ALV_STATUS
- &AVR
-
-
- ALV_STATUS
- &BS
-
-
- ALV_STATUS
- &BS+
-
-
- ALV_STATUS
- &BS-
-
-
- ALV_STATUS
- &CDF
-
-
- ALV_STATUS
- &CFI
-
-
- ALV_STATUS
- &COUNT
-
-
- ALV_STATUS
- &CRB
-
-
- ALV_STATUS
- &CRE
-
-
- ALV_STATUS
- &CRL
-
-
- ALV_STATUS
- &CRR
-
-
- ALV_STATUS
- &DAU
-
-
- ALV_STATUS
- &DOF
-
-
- ALV_STATUS
- &DON
-
-
- ALV_STATUS
- &EB3
-
-
- ALV_STATUS
- &EB9
-
-
- ALV_STATUS
- &ELP
-
-
- ALV_STATUS
- &ERW
-
-
- ALV_STATUS
- &ETA
-
-
- ALV_STATUS
- &F03
-
-
- ALV_STATUS
- &F12
-
-
- ALV_STATUS
- &F15
-
-
- ALV_STATUS
- &IC1
-
-
- ALV_STATUS
- &ILD
-
-
- ALV_STATUS
- &ILT
-
-
- ALV_STATUS
- &KOM
-
-
- ALV_STATUS
- &LFO
-
-
- ALV_STATUS
- &LIS
-
-
- ALV_STATUS
- &MAX
-
-
- ALV_STATUS
- &MIN
-
-
- ALV_STATUS
- &NFO
-
-
- ALV_STATUS
- &NTE
-
-
- ALV_STATUS
- &OAD
-
-
- ALV_STATUS
- &ODN
-
-
- ALV_STATUS
- &OL0
-
-
- ALV_STATUS
- &OL1
-
-
- ALV_STATUS
- &OLX
-
-
- ALV_STATUS
- &OMP
-
-
- ALV_STATUS
- &OPT
-
-
- ALV_STATUS
- &OUP
-
-
- ALV_STATUS
- &RNT
-
-
- ALV_STATUS
- &SAL
-
-
- ALV_STATUS
- &SUM
-
-
- ALV_STATUS
- &UMC
-
-
- ALV_STATUS
- &XML
-
-
- ALV_STATUS
- &XPA
-
-
- ALV_STATUS
- &XXL
-
-
- ALV_STATUS
- BAC1
-
-
- ALV_STATUS
- BACK
-
-
- ALV_STATUS
- BEB1
-
-
- ALV_STATUS
- BEB2
-
-
- ALV_STATUS
- BEB3
-
-
- ALV_STATUS
- BEB9
-
-
- ALV_STATUS
- BEBN
-
-
- ALV_STATUS
- COL0
-
-
- ALV_STATUS
- COLX
-
-
- ALV_STATUS
- DETA
-
-
- ALV_STATUS
- DRUK
-
-
- ALV_STATUS
- DSAL
-
-
- ALV_STATUS
- ENTE
-
-
- ALV_STATUS
- EXCEL
-
-
- ALV_STATUS
- EXCELBIND
-
-
- ALV_STATUS
- EXCELCELL
-
-
- ALV_STATUS
- EXCELCONV
-
-
- ALV_STATUS
- EXIT
-
-
- ALV_STATUS
- EXPA
-
-
- ALV_STATUS
- FILD
-
-
- ALV_STATUS
- FILT
-
-
- ALV_STATUS
- GLIS
-
-
- ALV_STATUS
- HELP
-
-
- ALV_STATUS
- INFO
-
-
- ALV_STATUS
- KOMP
-
-
- ALV_STATUS
- P+
-
-
- ALV_STATUS
- P++
-
-
- ALV_STATUS
- P-
-
-
- ALV_STATUS
- P--
-
-
- ALV_STATUS
- PF09
-
-
- ALV_STATUS
- PF13
-
-
- ALV_STATUS
- PIC1
-
-
- ALV_STATUS
- PICK
-
-
- ALV_STATUS
- PRI
-
-
- ALV_STATUS
- PRIN
-
-
- ALV_STATUS
- PRNT
-
-
- ALV_STATUS
- RW
-
-
- ALV_STATUS
- SALL
-
-
- ALV_STATUS
- SAUF
-
-
- ALV_STATUS
- SAVE
-
-
- ALV_STATUS
- SCRB
-
-
- ALV_STATUS
- SCRE
-
-
- ALV_STATUS
- SCRL
-
-
- ALV_STATUS
- SCRR
-
-
- ALV_STATUS
- SKOM
-
-
- ALV_STATUS
- SODN
-
-
- ALV_STATUS
- SOUP
-
-
- ALV_STATUS
- SUMC
-
-
- ALV_STATUS
- ZSUM
-
-
-
-
- A
- 000001
- D
- Standard User Interface STANDARD
-
-
- P
- 000001
- D
- X
- Standard Maximum Interaction
-
-
- B
- 000001
- 0001
- D
- Standard Maximum Interaction
-
-
-
-
- -
- R
- abap2xlsx Demo: Export ALV
- 26
-
-
-
-
-
diff --git a/src/demos/zdemo_excel33.prog.abap b/src/demos/zdemo_excel33.prog.abap
deleted file mode 100644
index 832ce64..0000000
--- a/src/demos/zdemo_excel33.prog.abap
+++ /dev/null
@@ -1,118 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL3
-*&
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel33.
-
-TYPES: ty_t005t_lines TYPE TABLE OF t005t.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_converter TYPE REF TO zcl_excel_converter,
- lo_autofilter TYPE REF TO zcl_excel_autofilter.
-
-DATA lt_test TYPE ty_t005t_lines.
-
-DATA: l_cell_value TYPE zexcel_cell_value,
- ls_area TYPE zexcel_s_autofilter_area.
-DATA: ls_option TYPE zexcel_s_converter_option.
-
-CONSTANTS: c_airlines TYPE string VALUE 'Airlines'.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '33_autofilter.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-PARAMETERS p_convex AS CHECKBOX.
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Internal table' ).
-
- PERFORM load_fixed_data CHANGING lt_test.
-
- CREATE OBJECT lo_converter.
-
- ls_option-conv_exit_length = p_convex.
- lo_converter->set_option( ls_option ).
- lo_converter->convert( EXPORTING
- it_table = lt_test
- i_row_int = 1
- i_column_int = 1
- io_worksheet = lo_worksheet
- CHANGING
- co_excel = lo_excel ) .
- PERFORM set_column_headers USING lo_worksheet 'Client;Language;Country;Name;Nationality;Long name;Nationality'.
-
- lo_autofilter = lo_excel->add_new_autofilter( io_sheet = lo_worksheet ) .
-
- ls_area-row_start = 1.
- ls_area-col_start = 1.
- ls_area-row_end = lo_worksheet->get_highest_row( ).
- ls_area-col_end = lo_worksheet->get_highest_column( ).
-
- lo_autofilter->set_filter_area( is_area = ls_area ).
-
- lo_worksheet->get_cell( EXPORTING
- ip_column = 'C'
- ip_row = 2
- IMPORTING
- ep_value = l_cell_value ).
- lo_autofilter->set_value( i_column = 3
- i_value = l_cell_value ).
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
-
-
-FORM load_fixed_data CHANGING ct_test TYPE ty_t005t_lines.
- DATA: lt_lines TYPE TABLE OF string,
- lv_line TYPE string,
- lt_fields TYPE TABLE OF string,
- lv_comp TYPE i,
- lv_field TYPE string,
- ls_test TYPE t005t.
- FIELD-SYMBOLS: TYPE simple.
-
- APPEND '001 E AD Andorra Andorran Andorra Andorran ' TO lt_lines.
- APPEND '001 E BE Belgium Belgian Belgium Belgian ' TO lt_lines.
- APPEND '001 E DE Germany German Germany German ' TO lt_lines.
- APPEND '001 E FM Micronesia Micronesian Micronesia Micronesian' TO lt_lines.
- LOOP AT lt_lines INTO lv_line.
- CONDENSE lv_line.
- SPLIT lv_line AT space INTO TABLE lt_fields.
- lv_comp = 1.
- LOOP AT lt_fields INTO lv_field.
- ASSIGN COMPONENT lv_comp OF STRUCTURE ls_test TO .
- = lv_field.
- lv_comp = lv_comp + 1.
- ENDLOOP.
- APPEND ls_test TO ct_test.
- ENDLOOP.
-ENDFORM.
-
-FORM set_column_headers
- USING io_worksheet TYPE REF TO zcl_excel_worksheet
- iv_headers TYPE csequence
- RAISING zcx_excel.
-
- DATA: lt_headers TYPE TABLE OF string,
- lv_header TYPE string,
- lv_tabix TYPE i.
-
- SPLIT iv_headers AT ';' INTO TABLE lt_headers.
- LOOP AT lt_headers INTO lv_header.
- lv_tabix = sy-tabix.
- io_worksheet->set_cell( ip_row = 1 ip_column = lv_tabix ip_value = lv_header ).
- ENDLOOP.
-
-ENDFORM.
diff --git a/src/demos/zdemo_excel33.prog.xml b/src/demos/zdemo_excel33.prog.xml
deleted file mode 100644
index 9ef5f5f..0000000
--- a/src/demos/zdemo_excel33.prog.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL33
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Autofilter
- 26
-
- -
- S
- P_CONVEX
- Output length for conv. exits
- 37
-
- -
- S
- P_PATH
- .
- 24
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel34.prog.abap b/src/demos/zdemo_excel34.prog.abap
deleted file mode 100644
index 8d8b0f3..0000000
--- a/src/demos/zdemo_excel34.prog.abap
+++ /dev/null
@@ -1,217 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL2
-*& Test Styles for ABAP2XLSX
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel34.
-
-CONSTANTS: width TYPE f VALUE '10.14'.
-CONSTANTS: height TYPE f VALUE '57.75'.
-
-DATA: current_row TYPE i,
- col TYPE i,
- col_alpha TYPE zexcel_cell_column_alpha,
- row TYPE i,
- row_board TYPE i,
- colorflag TYPE i,
- color TYPE zexcel_style_color_argb,
-
- lo_column TYPE REF TO zcl_excel_column,
- lo_row TYPE REF TO zcl_excel_row,
-
- writing1 TYPE string,
- writing2 TYPE string.
-
-
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '34_Static Styles_Chess.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-START-OF-SELECTION.
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Spassky_vs_Bronstein' ).
-
-* Header
- current_row = 1.
-
- ADD 1 TO current_row.
- lo_worksheet->set_cell( ip_row = current_row ip_column = 'B' ip_value = 'White' ).
- lo_worksheet->set_cell( ip_row = current_row ip_column = 'C' ip_value = 'Spassky, Boris V -- wins in turn 23' ).
-
- ADD 1 TO current_row.
- lo_worksheet->set_cell( ip_row = current_row ip_column = 'B' ip_value = 'Black' ).
- lo_worksheet->set_cell( ip_row = current_row ip_column = 'C' ip_value = 'Bronstein, David I' ).
-
- ADD 1 TO current_row.
-* Set size of column + Writing above chessboard
- DO 8 TIMES.
-
- writing1 = zcl_excel_common=>convert_column2alpha( sy-index ).
- writing2 = sy-index .
- row = current_row + sy-index.
-
- col = sy-index + 1.
- col_alpha = zcl_excel_common=>convert_column2alpha( col ).
-
-* Set size of column
- lo_column = lo_worksheet->get_column( col_alpha ).
- lo_column->set_width( width ).
-
-* Set size of row
- lo_row = lo_worksheet->get_row( row ).
- lo_row->set_row_height( height ).
-
-* Set writing on chessboard
- lo_worksheet->set_cell( ip_row = row
- ip_column = 'A'
- ip_value = writing2 ).
- lo_worksheet->change_cell_style( ip_column = 'A'
- ip_row = row
- ip_alignment_vertical = zcl_excel_style_alignment=>c_vertical_center ).
- lo_worksheet->set_cell( ip_row = row
- ip_column = 'J'
- ip_value = writing2 ).
- lo_worksheet->change_cell_style( ip_column = 'J'
- ip_row = row
- ip_alignment_vertical = zcl_excel_style_alignment=>c_vertical_center ).
-
- row = current_row + 9.
- lo_worksheet->set_cell( ip_row = current_row
- ip_column = col_alpha
- ip_value = writing1 ).
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = current_row
- ip_alignment_horizontal = zcl_excel_style_alignment=>c_horizontal_center ).
- lo_worksheet->set_cell( ip_row = row
- ip_column = col_alpha
- ip_value = writing1 ).
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_alignment_horizontal = zcl_excel_style_alignment=>c_horizontal_center ).
- ENDDO.
- lo_column = lo_worksheet->get_column( 'A' ).
- lo_column->set_auto_size( abap_true ).
- lo_column = lo_worksheet->get_column( 'J' ).
- lo_column->set_auto_size( abap_true ).
-
-* Set win-position
- CONSTANTS: c_pawn TYPE string VALUE 'Pawn'.
- CONSTANTS: c_rook TYPE string VALUE 'Rook'.
- CONSTANTS: c_knight TYPE string VALUE 'Knight'.
- CONSTANTS: c_bishop TYPE string VALUE 'Bishop'.
- CONSTANTS: c_queen TYPE string VALUE 'Queen'.
- CONSTANTS: c_king TYPE string VALUE 'King'.
-
- row = current_row + 1.
- lo_worksheet->set_cell( ip_row = row ip_column = 'B' ip_value = c_rook ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'F' ip_value = c_rook ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'G' ip_value = c_knight ).
- row = current_row + 2.
- lo_worksheet->set_cell( ip_row = row ip_column = 'B' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'C' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'D' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'F' ip_value = c_queen ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'H' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'I' ip_value = c_king ).
- row = current_row + 3.
- lo_worksheet->set_cell( ip_row = row ip_column = 'I' ip_value = c_pawn ).
- row = current_row + 4.
- lo_worksheet->set_cell( ip_row = row ip_column = 'D' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'F' ip_value = c_knight ).
- row = current_row + 5.
- lo_worksheet->set_cell( ip_row = row ip_column = 'E' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'F' ip_value = c_queen ).
- row = current_row + 6.
- lo_worksheet->set_cell( ip_row = row ip_column = 'C' ip_value = c_bishop ).
- row = current_row + 7.
- lo_worksheet->set_cell( ip_row = row ip_column = 'B' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'C' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'H' ip_value = c_pawn ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'I' ip_value = c_pawn ).
- row = current_row + 8.
- lo_worksheet->set_cell( ip_row = row ip_column = 'G' ip_value = c_rook ).
- lo_worksheet->set_cell( ip_row = row ip_column = 'H' ip_value = c_king ).
-
-* Set Chessboard
- DO 8 TIMES.
- IF sy-index <= 3. " Black
- color = zcl_excel_style_color=>c_black.
- ELSE.
- color = zcl_excel_style_color=>c_white.
- ENDIF.
- row_board = sy-index.
- row = current_row + sy-index.
- DO 8 TIMES.
- col = sy-index + 1.
- col_alpha = zcl_excel_common=>convert_column2alpha( col ).
- TRY.
-* Borders around outer limits
- IF row_board = 1.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_borders_top_style = zcl_excel_style_border=>c_border_thick
- ip_borders_top_color_rgb = zcl_excel_style_color=>c_black ).
- ENDIF.
- IF row_board = 8.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_borders_down_style = zcl_excel_style_border=>c_border_thick
- ip_borders_down_color_rgb = zcl_excel_style_color=>c_black ).
- ENDIF.
- IF col = 2.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_borders_left_style = zcl_excel_style_border=>c_border_thick
- ip_borders_left_color_rgb = zcl_excel_style_color=>c_black ).
- ENDIF.
- IF col = 9.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_borders_right_style = zcl_excel_style_border=>c_border_thick
- ip_borders_right_color_rgb = zcl_excel_style_color=>c_black ).
- ENDIF.
-* Style for writing
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_font_color_rgb = color
- ip_font_bold = 'X'
- ip_font_size = 16
- ip_alignment_horizontal = zcl_excel_style_alignment=>c_horizontal_center
- ip_alignment_vertical = zcl_excel_style_alignment=>c_vertical_center
- ip_fill_filltype = zcl_excel_style_fill=>c_fill_solid ).
-* Color of field
- colorflag = ( row + col ) MOD 2.
- IF colorflag = 0.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_fill_fgcolor_rgb = 'FFB5866A'
- ip_fill_filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal135 ).
- ELSE.
- lo_worksheet->change_cell_style( ip_column = col_alpha
- ip_row = row
- ip_fill_fgcolor_rgb = 'FFF5DEBF'
- ip_fill_filltype = zcl_excel_style_fill=>c_fill_gradient_diagonal45 ).
- ENDIF.
-
-
-
- CATCH zcx_excel .
- ENDTRY.
-
- ENDDO.
- ENDDO.
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel34.prog.xml b/src/demos/zdemo_excel34.prog.xml
deleted file mode 100644
index 741632b..0000000
--- a/src/demos/zdemo_excel34.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL34
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Static Styles (Chess)
- 37
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel35.prog.abap b/src/demos/zdemo_excel35.prog.abap
deleted file mode 100644
index 1241229..0000000
--- a/src/demos/zdemo_excel35.prog.abap
+++ /dev/null
@@ -1,170 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL2
-*& Test Styles for ABAP2XLSX
-*&---------------------------------------------------------------------*
-*&
-*&
-*&---------------------------------------------------------------------*
-
-REPORT zdemo_excel35.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_excel_writer TYPE REF TO zif_excel_writer,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_style_bold TYPE REF TO zcl_excel_style,
- lo_style_underline TYPE REF TO zcl_excel_style,
- lo_style_filled TYPE REF TO zcl_excel_style,
- lo_style_border TYPE REF TO zcl_excel_style,
- lo_style_button TYPE REF TO zcl_excel_style,
- lo_border_dark TYPE REF TO zcl_excel_style_border,
- lo_border_light TYPE REF TO zcl_excel_style_border.
-
-DATA: lv_style_bold_guid TYPE zexcel_cell_style,
- lv_style_underline_guid TYPE zexcel_cell_style,
- lv_style_filled_guid TYPE zexcel_cell_style,
- lv_style_filled_green_guid TYPE zexcel_cell_style,
- lv_style_border_guid TYPE zexcel_cell_style,
- lv_style_button_guid TYPE zexcel_cell_style,
- lv_style_filled_turquoise_guid TYPE zexcel_cell_style.
-
-DATA: lv_file TYPE xstring,
- lv_bytecount TYPE i,
- lt_file_tab TYPE solix_tab.
-
-DATA: lv_full_path TYPE string,
- lv_workdir TYPE string,
- lv_file_separator TYPE c.
-
-CONSTANTS: lv_default_file_name TYPE string VALUE '35_Static_Styles.xlsx'.
-
-PARAMETERS: p_path TYPE zexcel_export_dir.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
- lv_workdir = p_path.
- cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
- CHANGING selected_folder = lv_workdir ).
- p_path = lv_workdir.
-
-INITIALIZATION.
- cl_gui_frontend_services=>get_desktop_directory( CHANGING desktop_directory = lv_workdir ).
- cl_gui_cfw=>flush( ).
- p_path = lv_workdir.
-
-START-OF-SELECTION.
-
- IF p_path IS INITIAL.
- p_path = lv_workdir.
- ENDIF.
- cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
- CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Create border object
- CREATE OBJECT lo_border_dark.
- lo_border_dark->border_color-rgb = zcl_excel_style_color=>c_black.
- lo_border_dark->border_style = zcl_excel_style_border=>c_border_thin.
- CREATE OBJECT lo_border_light.
- lo_border_light->border_color-rgb = zcl_excel_style_color=>c_gray.
- lo_border_light->border_style = zcl_excel_style_border=>c_border_thin.
- " Create a bold / italic style
- lo_style_bold = lo_excel->add_new_style( ).
- lo_style_bold->font->bold = abap_true.
- lo_style_bold->font->italic = abap_true.
- lo_style_bold->font->name = zcl_excel_style_font=>c_name_arial.
- lo_style_bold->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_bold->font->color-rgb = zcl_excel_style_color=>c_red.
- lv_style_bold_guid = lo_style_bold->get_guid( ).
- " Create an underline double style
- lo_style_underline = lo_excel->add_new_style( ).
- lo_style_underline->font->underline = abap_true.
- lo_style_underline->font->underline_mode = zcl_excel_style_font=>c_underline_double.
- lo_style_underline->font->name = zcl_excel_style_font=>c_name_roman.
- lo_style_underline->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_underline->font->family = zcl_excel_style_font=>c_family_roman.
- lv_style_underline_guid = lo_style_underline->get_guid( ).
- " Create filled style yellow
- lo_style_filled = lo_excel->add_new_style( ).
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-theme = zcl_excel_style_color=>c_theme_accent6.
- lv_style_filled_guid = lo_style_filled->get_guid( ).
- " Create border with button effects
- lo_style_button = lo_excel->add_new_style( ).
- lo_style_button->borders->right = lo_border_dark.
- lo_style_button->borders->down = lo_border_dark.
- lo_style_button->borders->left = lo_border_light.
- lo_style_button->borders->top = lo_border_light.
- lv_style_button_guid = lo_style_button->get_guid( ).
- "Create style with border
- lo_style_border = lo_excel->add_new_style( ).
- lo_style_border->borders->allborders = lo_border_dark.
- lo_style_border->borders->diagonal = lo_border_dark.
- lo_style_border->borders->diagonal_mode = zcl_excel_style_borders=>c_diagonal_both.
- lv_style_border_guid = lo_style_border->get_guid( ).
- " Create filled style green
- lo_style_filled = lo_excel->add_new_style( ).
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-rgb = zcl_excel_style_color=>c_green.
- lo_style_filled->font->name = zcl_excel_style_font=>c_name_cambria.
- lo_style_filled->font->scheme = zcl_excel_style_font=>c_scheme_major.
- lv_style_filled_green_guid = lo_style_filled->get_guid( ).
-
- " Create filled style turquoise using legacy excel ver <= 2003 palette. (https://code.sdn.sap.com/spaces/abap2xlsx/tickets/92)
- lo_style_filled = lo_excel->add_new_style( ).
- lo_excel->legacy_palette->set_color( "replace built-in color from palette with out custom RGB turquoise
- ip_index = 16
- ip_color = '0040E0D0' ).
-
- lo_style_filled->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
- lo_style_filled->fill->fgcolor-indexed = 16.
- lv_style_filled_turquoise_guid = lo_style_filled->get_guid( ).
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Styles' ).
- lo_worksheet->set_cell( ip_columnrow = 'B2' ip_value = 'Hello world' ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = 'Bold text' ip_style = lv_style_bold_guid ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 4 ip_value = 'Underlined text' ip_style = lv_style_underline_guid ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'Filled text' ip_style = lv_style_filled_guid ).
- lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = 'Borders' ip_style = lv_style_border_guid ).
- lo_worksheet->set_cell( ip_column = 'D' ip_row = 7 ip_value = 'I''m not a button :)' ip_style = lv_style_button_guid ).
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'Modified color for Excel 2003' ip_style = lv_style_filled_turquoise_guid ).
- " Fill the cell and apply one style
- lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = 'Filled text' ip_style = lv_style_filled_guid ).
- " Change the style
- lo_worksheet->set_cell_style( ip_columnrow = 'B6' ip_style = lv_style_filled_green_guid ).
- " Add Style to an empty cell to test Fix for Issue
- "#44 Exception ZCX_EXCEL thrown when style is set for an empty cell
- " https://code.sdn.sap.com/spaces/abap2xlsx/tickets/44-exception-zcx_excel-thrown-when-style-is-set-for-an-empty-cell
- lo_worksheet->set_cell_style( ip_column = 'E' ip_row = 6 ip_style = lv_style_filled_green_guid ).
-
-
-* Demonstrate how to retroactivly change the cellstyle
-*Filled text and underlinded text
- lo_worksheet->change_cell_style( ip_columnrow = 'B5'
- ip_font_bold = abap_true
- ip_font_italic = abap_true ).
-
- lo_worksheet->change_cell_style( ip_column = 'D'
- ip_row = 4
- ip_font_bold = abap_true
- ip_font_italic = abap_true ).
-
- CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
- lv_file = lo_excel_writer->write_file( lo_excel ).
-
- " Convert to binary
- CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
- EXPORTING
- buffer = lv_file
- IMPORTING
- output_length = lv_bytecount
- TABLES
- binary_tab = lt_file_tab.
-
- " Save the file
- cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
- filename = lv_full_path
- filetype = 'BIN'
- CHANGING data_tab = lt_file_tab ).
diff --git a/src/demos/zdemo_excel35.prog.xml b/src/demos/zdemo_excel35.prog.xml
deleted file mode 100644
index a8a3fb5..0000000
--- a/src/demos/zdemo_excel35.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL35
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: static styles
- 33
-
- -
- S
- P_PATH
- .
- 9
- D
-
-
-
-
-
diff --git a/src/demos/zdemo_excel36.prog.abap b/src/demos/zdemo_excel36.prog.abap
deleted file mode 100644
index 2211236..0000000
--- a/src/demos/zdemo_excel36.prog.abap
+++ /dev/null
@@ -1,111 +0,0 @@
-*&---------------------------------------------------------------------*
-*& Report ZDEMO_EXCEL36
-REPORT zdemo_excel36.
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column,
- col TYPE i.
-
-DATA: lo_style_arial20 TYPE REF TO zcl_excel_style,
- lo_style_times11 TYPE REF TO zcl_excel_style,
- lo_style_cambria8red TYPE REF TO zcl_excel_style.
-
-DATA: lv_style_arial20_guid TYPE zexcel_cell_style,
- lv_style_times11_guid TYPE zexcel_cell_style,
- lv_style_cambria8red_guid TYPE zexcel_cell_style.
-
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '36_DefaultStyles.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-START-OF-SELECTION.
-
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Create a bold / italic style
- lo_style_arial20 = lo_excel->add_new_style( ).
- lo_style_arial20->font->name = zcl_excel_style_font=>c_name_arial.
- lo_style_arial20->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_arial20->font->size = 20.
- lv_style_arial20_guid = lo_style_arial20->get_guid( ).
-
- lo_style_times11 = lo_excel->add_new_style( ).
- lo_style_times11->font->name = zcl_excel_style_font=>c_name_roman.
- lo_style_times11->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_times11->font->size = 11.
- lv_style_times11_guid = lo_style_times11->get_guid( ).
-
- lo_style_cambria8red = lo_excel->add_new_style( ).
- lo_style_cambria8red->font->name = zcl_excel_style_font=>c_name_cambria.
- lo_style_cambria8red->font->scheme = zcl_excel_style_font=>c_scheme_none.
- lo_style_cambria8red->font->size = 8.
- lo_style_cambria8red->font->color-rgb = zcl_excel_style_color=>c_red.
- lv_style_cambria8red_guid = lo_style_cambria8red->get_guid( ).
-
- lo_excel->set_default_style( lv_style_arial20_guid ). " Default for all new worksheets
-
-* 1st sheet - do not change anything --> defaultstyle from lo_excel should apply
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( 'Style for complete document' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 4 ip_value = 'All cells in this sheet are set to font Arial, fontsize 20' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 5 ip_value = 'because no separate style was passed for this sheet' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 6 ip_value = 'but a default style was set for the complete instance of zcl_excel' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 1 ip_value = space ). " Missing feature "set active cell - use this to simulate that
-
-
-* 2nd sheet - defaultstyle for this sheet set explicitly ( set to Times New Roman 11 )
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( 'Style for this sheet' ).
- lo_worksheet->zif_excel_sheet_properties~set_style( lv_style_times11_guid ).
-
- lo_worksheet->set_cell( ip_column = 2 ip_row = 4 ip_value = 'All cells in this sheet are set to font Times New Roman, fontsize 11' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 5 ip_value = 'because this style was passed for this sheet' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 6 ip_value = 'thus the default style from zcl_excel does not apply to this sheet' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 1 ip_value = space ). " Missing feature "set active cell - use this to simulate that
-
-
-* 3rd sheet - defaultstyle for columns ( set to Times New Roman 11 )
- lo_worksheet = lo_excel->add_new_worksheet( ).
- lo_worksheet->set_title( 'Style for 3 columns' ).
- lo_column = lo_worksheet->get_column( 'B' ).
- lo_column->set_column_style_by_guid( ip_style_guid = lv_style_times11_guid ).
- lo_column = lo_worksheet->get_column( 'C' ).
- lo_column->set_column_style_by_guid( ip_style_guid = lv_style_times11_guid ).
- lo_column = lo_worksheet->get_column( 'F' ).
- lo_column->set_column_style_by_guid( ip_style_guid = lv_style_times11_guid ).
-
- lo_worksheet->set_cell( ip_column = 2 ip_row = 4 ip_value = 'The columns B,C and F are set to Times New Roman' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 10 ip_value = 'All other cells in this sheet are set to font Arial, fontsize 20' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 11 ip_value = 'because no separate style was passed for this sheet' ).
- lo_worksheet->set_cell( ip_column = 2 ip_row = 12 ip_value = 'but a default style was set for the complete instance of zcl_excel' ).
-
- lo_worksheet->set_cell( ip_column = 8 ip_row = 1 ip_value = 'Of course' ip_style = lv_style_cambria8red_guid ).
- lo_worksheet->set_cell( ip_column = 8 ip_row = 2 ip_value = 'setting a specific style to a cell' ip_style = lv_style_cambria8red_guid ).
- lo_worksheet->set_cell( ip_column = 8 ip_row = 3 ip_value = 'takes precedence over all defaults' ip_style = lv_style_cambria8red_guid ).
- lo_worksheet->set_cell( ip_column = 8 ip_row = 4 ip_value = 'Here: Cambria 8 in red' ip_style = lv_style_cambria8red_guid ).
-
-
-* Set entry into each of the first 10 columns
- DO 20 TIMES.
- col = sy-index.
- CASE col.
- WHEN 2 " B
- OR 3 " C
- OR 6." F
- lo_worksheet->set_cell( ip_column = col ip_row = 6 ip_value = 'Times 11' ).
- WHEN OTHERS.
- lo_worksheet->set_cell( ip_column = col ip_row = 6 ip_value = 'Arial 20' ).
- ENDCASE.
- ENDDO.
-
- lo_worksheet->set_cell( ip_column = 2 ip_row = 1 ip_value = space ). " Missing feature "set active cell - use this to simulate that
-
-
-
- lo_excel->set_active_sheet_index( 1 ).
-
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel36.prog.xml b/src/demos/zdemo_excel36.prog.xml
deleted file mode 100644
index c957dc4..0000000
--- a/src/demos/zdemo_excel36.prog.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL36
- 1
- T
- E
- X
- X
-
-
- -
- R
- abap2xlsx Demo: Default Styles
- 31
-
-
-
-
-
diff --git a/src/demos/zdemo_excel37.prog.abap b/src/demos/zdemo_excel37.prog.abap
deleted file mode 100644
index b9eaf81..0000000
--- a/src/demos/zdemo_excel37.prog.abap
+++ /dev/null
@@ -1,301 +0,0 @@
-REPORT zdemo_excel37.
-
-DATA: excel TYPE REF TO zcl_excel,
- reader TYPE REF TO zif_excel_reader,
- go_error TYPE REF TO cx_root,
- gv_memid_gr8 TYPE text255,
- gv_message TYPE string,
- lv_extension TYPE string,
- gv_error_program_name TYPE syrepid,
- gv_error_include_name TYPE syrepid,
- gv_error_line TYPE i.
-
-DATA: gc_save_file_name TYPE string VALUE '37- Read template and output.&'.
-
-SELECTION-SCREEN BEGIN OF BLOCK blx WITH FRAME.
-PARAMETERS: p_upfile TYPE string LOWER CASE MEMORY ID gr8.
-PARAMETERS: p_applse AS CHECKBOX.
-SELECTION-SCREEN END OF BLOCK blx.
-
-INCLUDE zdemo_excel_outputopt_incl.
-
-SELECTION-SCREEN BEGIN OF BLOCK cls WITH FRAME TITLE TEXT-cls.
-PARAMETERS: lb_read TYPE seoclsname AS LISTBOX VISIBLE LENGTH 40 LOWER CASE OBLIGATORY DEFAULT 'Autodetect'(001).
-PARAMETERS: lb_write TYPE seoclsname AS LISTBOX VISIBLE LENGTH 40 LOWER CASE OBLIGATORY DEFAULT 'Autodetect'(001).
-SELECTION-SCREEN END OF BLOCK cls.
-
-SELECTION-SCREEN BEGIN OF BLOCK bl_err WITH FRAME TITLE TEXT-err.
-PARAMETERS: cb_errl AS CHECKBOX DEFAULT 'X'.
-SELECTION-SCREEN BEGIN OF LINE.
-PARAMETERS: cb_dump AS CHECKBOX DEFAULT space.
-SELECTION-SCREEN COMMENT (60) cmt_dump FOR FIELD cb_dump.
-SELECTION-SCREEN END OF LINE.
-SELECTION-SCREEN END OF BLOCK bl_err.
-
-INITIALIZATION.
- PERFORM setup_listboxes.
- cmt_dump = TEXT-dum.
- GET PARAMETER ID 'GR8' FIELD gv_memid_gr8.
- p_upfile = gv_memid_gr8.
-
- IF p_upfile IS INITIAL.
- p_upfile = 'c:\temp\whatever.xlsx'.
- ENDIF.
-
-AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_upfile.
- PERFORM f4_p_upfile CHANGING p_upfile.
-
-
-START-OF-SELECTION.
- IF cb_dump IS INITIAL.
- TRY.
- PERFORM read_template.
- PERFORM write_template.
-*** Create output
- CATCH cx_root INTO go_error.
- MESSAGE 'Error reading excelfile' TYPE 'I'.
- gv_message = go_error->get_text( ).
- IF cb_errl = ' '.
- IF gv_message IS NOT INITIAL.
- MESSAGE gv_message TYPE 'I'.
- ENDIF.
- ELSE.
- go_error->get_source_position( IMPORTING program_name = gv_error_program_name
- include_name = gv_error_include_name
- source_line = gv_error_line ).
- WRITE:/ 'Errormessage:' ,gv_message.
- WRITE:/ 'Errorposition:',
- AT /10 'Program:' ,gv_error_program_name,
- AT /10 'include_name:' ,gv_error_include_name,
- AT /10 'source_line:' ,gv_error_line.
- ENDIF.
- ENDTRY.
- ELSE. " This will dump if an error occurs. In some cases the information given in cx_root is not helpful - this will show exactly where the problem is
- PERFORM read_template.
- PERFORM write_template.
- ENDIF.
-
-
-
-*&---------------------------------------------------------------------*
-*& Form F4_P_UPFILE
-*&---------------------------------------------------------------------*
-FORM f4_p_upfile CHANGING p_upfile TYPE string.
-
- DATA: lv_repid TYPE syrepid,
- lt_fields TYPE dynpread_tabtype,
- ls_field LIKE LINE OF lt_fields,
- lt_files TYPE filetable,
- lv_rc TYPE i,
- lv_file_filter TYPE string.
-
- lv_repid = sy-repid.
-
- CALL FUNCTION 'DYNP_VALUES_READ'
- EXPORTING
- dyname = lv_repid
- dynumb = '1000'
- request = 'A'
- TABLES
- dynpfields = lt_fields
- EXCEPTIONS
- invalid_abapworkarea = 01
- invalid_dynprofield = 02
- invalid_dynproname = 03
- invalid_dynpronummer = 04
- invalid_request = 05
- no_fielddescription = 06
- undefind_error = 07.
- READ TABLE lt_fields INTO ls_field WITH KEY fieldname = 'P_UPFILE'.
- p_upfile = ls_field-fieldvalue.
-
- lv_file_filter = 'Excel Files (*.XLSX;*.XLSM)|*.XLSX;*.XLSM'.
- cl_gui_frontend_services=>file_open_dialog( EXPORTING
- default_filename = p_upfile
- file_filter = lv_file_filter
- CHANGING
- file_table = lt_files
- rc = lv_rc
- EXCEPTIONS
- OTHERS = 1 ).
- READ TABLE lt_files INDEX 1 INTO p_upfile.
-
-ENDFORM. " F4_P_UPFILE
-
-
-*&---------------------------------------------------------------------*
-*& Form SETUP_LISTBOXES
-*&---------------------------------------------------------------------*
-FORM setup_listboxes .
-
- DATA: lv_id TYPE vrm_id,
- lt_values TYPE vrm_values,
- lt_implementing_classes TYPE seo_relkeys.
-
- FIELD-SYMBOLS: LIKE LINE OF lt_implementing_classes,
- LIKE LINE OF lt_values.
-
-*--------------------------------------------------------------------*
-* Possible READER-Classes
-*--------------------------------------------------------------------*
- lv_id = 'LB_READ'.
- APPEND INITIAL LINE TO lt_values ASSIGNING .
- -key = 'Autodetect'(001).
- -text = 'Autodetect'(001).
-
-
- PERFORM get_implementing_classds USING 'ZIF_EXCEL_READER'
- CHANGING lt_implementing_classes.
- CLEAR lt_values.
- LOOP AT lt_implementing_classes ASSIGNING .
-
- APPEND INITIAL LINE TO lt_values ASSIGNING .
- -key = -clsname.
- -text = -clsname.
-
- ENDLOOP.
-
- CALL FUNCTION 'VRM_SET_VALUES'
- EXPORTING
- id = lv_id
- values = lt_values
- EXCEPTIONS
- id_illegal_name = 1
- OTHERS = 2.
-
-*--------------------------------------------------------------------*
-* Possible WRITER-Classes
-*--------------------------------------------------------------------*
- lv_id = 'LB_WRITE'.
- APPEND INITIAL LINE TO lt_values ASSIGNING .
- -key = 'Autodetect'(001).
- -text = 'Autodetect'(001).
-
-
- PERFORM get_implementing_classds USING 'ZIF_EXCEL_WRITER'
- CHANGING lt_implementing_classes.
- CLEAR lt_values.
- LOOP AT lt_implementing_classes ASSIGNING .
-
- APPEND INITIAL LINE TO lt_values ASSIGNING .
- -key = -clsname.
- -text = -clsname.
-
- ENDLOOP.
-
- CALL FUNCTION 'VRM_SET_VALUES'
- EXPORTING
- id = lv_id
- values = lt_values
- EXCEPTIONS
- id_illegal_name = 1
- OTHERS = 2.
-
-ENDFORM. " SETUP_LISTBOXES
-
-
-*&---------------------------------------------------------------------*
-*& Form GET_IMPLEMENTING_CLASSDS
-*&---------------------------------------------------------------------*
-FORM get_implementing_classds USING iv_interface_name TYPE clike
- CHANGING ct_implementing_classes TYPE seo_relkeys.
-
- DATA: lo_oo_interface TYPE REF TO cl_oo_interface,
- lo_oo_class TYPE REF TO cl_oo_class,
- lt_implementing_subclasses TYPE seo_relkeys.
-
- FIELD-SYMBOLS: LIKE LINE OF ct_implementing_classes.
-
- TRY.
- lo_oo_interface ?= cl_oo_interface=>get_instance( iv_interface_name ).
- CATCH cx_class_not_existent.
- RETURN.
- ENDTRY.
- ct_implementing_classes = lo_oo_interface->get_implementing_classes( ).
-
- LOOP AT ct_implementing_classes ASSIGNING .
- TRY.
- lo_oo_class ?= cl_oo_class=>get_instance( -clsname ).
- lt_implementing_subclasses = lo_oo_class->get_subclasses( ).
- APPEND LINES OF lt_implementing_subclasses TO ct_implementing_classes.
- CATCH cx_class_not_existent.
- ENDTRY.
- ENDLOOP.
-
-
-ENDFORM. " GET_IMPLEMENTING_CLASSDS
-
-
-*&---------------------------------------------------------------------*
-*& Form READ_TEMPLATE
-*&---------------------------------------------------------------------*
-FORM read_template RAISING zcx_excel .
-
- CASE lb_read.
- WHEN 'Autodetect'(001).
- FIND REGEX '(\.xlsx|\.xlsm)\s*$' IN p_upfile SUBMATCHES lv_extension.
- TRANSLATE lv_extension TO UPPER CASE.
- CASE lv_extension.
-
- WHEN '.XLSX'.
- CREATE OBJECT reader TYPE zcl_excel_reader_2007.
- excel = reader->load_file( i_filename = p_upfile i_from_applserver = p_applse ).
- "Use template for charts
- excel->use_template = abap_true.
-
- WHEN '.XLSM'.
- CREATE OBJECT reader TYPE zcl_excel_reader_xlsm.
- excel = reader->load_file( i_filename = p_upfile i_from_applserver = p_applse ).
- "Use template for charts
- excel->use_template = abap_true.
-
- WHEN OTHERS.
- MESSAGE 'Unsupported filetype' TYPE 'I'.
- RETURN.
-
- ENDCASE.
-
- WHEN OTHERS.
- CREATE OBJECT reader TYPE (lb_read).
- excel = reader->load_file( i_filename = p_upfile i_from_applserver = p_applse ).
- "Use template for charts
- excel->use_template = abap_true.
-
- ENDCASE.
-
-ENDFORM. " READ_TEMPLATE
-
-
-*&---------------------------------------------------------------------*
-*& Form WRITE_TEMPLATE
-*&---------------------------------------------------------------------*
-FORM write_template RAISING zcx_excel.
-
- CASE lb_write.
-
- WHEN 'Autodetect'(001).
- FIND REGEX '(\.xlsx|\.xlsm)\s*$' IN p_upfile SUBMATCHES lv_extension.
- TRANSLATE lv_extension TO UPPER CASE.
- CASE lv_extension.
-
- WHEN '.XLSX'.
- REPLACE '&' IN gc_save_file_name WITH 'xlsx'. " Pass extension for standard writer
- lcl_output=>output( excel ).
-
- WHEN '.XLSM'.
- REPLACE '&' IN gc_save_file_name WITH 'xlsm'. " Pass extension for macro-writer
- lcl_output=>output( cl_excel = excel
- iv_writerclass_name = 'ZCL_EXCEL_WRITER_XLSM' ).
-
- WHEN OTHERS.
- MESSAGE 'Unsupported filetype' TYPE 'I'.
- RETURN.
-
- ENDCASE.
-
- WHEN OTHERS.
- lcl_output=>output( cl_excel = excel
- iv_writerclass_name = lb_write ).
- ENDCASE.
-
-ENDFORM. " WRITE_TEMPLATE
diff --git a/src/demos/zdemo_excel37.prog.xml b/src/demos/zdemo_excel37.prog.xml
deleted file mode 100644
index 7894aef..0000000
--- a/src/demos/zdemo_excel37.prog.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
- ZDEMO_EXCEL37
- 1
- T
- E
- X
- X
-
-
- -
- I
- DUM
- Enable dump creation
- 40
-
- -
- R
- abap2xlsx Demo: Read xlsx-file and output = using templates
- 59
-
- -
- S
- CB_ERRL
- Show error location
- 27
-
- -
- S
- LB_READ
- Reader class
- 20
-
- -
- S
- LB_WRITE
- Writer class
- 20
-
- -
- S
- P_APPLSE
- From Application Server
- 31
-
- -
- S
- P_UPFILE
- Input template
- 22
-
-
-
- -
- D
-
-
-
- I
- CLS
- Auswahl der Reader- und Writerklasse
- 70
-
- -
- I
- DUM
- Dump bei unbeh. Exception. Man weiß wenn man das braucht
- 60
-
- -
- I
- ERR
- Besondere Schalter
- 60
-
- -
- R
- Xlsx-Datei lesen und dann wieder ausgeben = Arbeiten mit Templates
- 70
-
- -
- S
- CB_DUMP
- Dump bei unbeh. Exceptions
- 36
-
- -
- S
- CB_ERRL
- Exceptionposition anzeigen
- 34
-
- -
- S
- LB_READ
- Reader-Klasse
- 21
-
- -
- S
- LB_WRITE
- Writer-Klasse
- 21
-
- -
- S
- P_UPFILE
- Hochzuladende Datei
- 27
-
-
-
-
-
-
-
diff --git a/src/demos/zdemo_excel38.prog.abap b/src/demos/zdemo_excel38.prog.abap
deleted file mode 100644
index 2a59f9d..0000000
--- a/src/demos/zdemo_excel38.prog.abap
+++ /dev/null
@@ -1,106 +0,0 @@
-REPORT zdemo_excel38.
-
-
-DATA: lo_excel TYPE REF TO zcl_excel,
- lo_worksheet TYPE REF TO zcl_excel_worksheet,
- lo_column TYPE REF TO zcl_excel_column,
- lo_drawing TYPE REF TO zcl_excel_drawing.
-
-TYPES: BEGIN OF gty_icon,
-* name TYPE icon_name, "Fix #228
- name TYPE iconname, "Fix #228
- objid TYPE w3objid,
- END OF gty_icon,
- gtyt_icon TYPE STANDARD TABLE OF gty_icon WITH NON-UNIQUE DEFAULT KEY.
-
-DATA: lt_icon TYPE gtyt_icon,
- lv_row TYPE i,
- ls_wwwdatatab TYPE wwwdatatab,
- lt_mimedata TYPE STANDARD TABLE OF w3mime WITH NON-UNIQUE DEFAULT KEY,
- lv_xstring TYPE xstring.
-
-FIELD-SYMBOLS: LIKE LINE OF lt_icon,
- LIKE LINE OF lt_mimedata.
-
-CONSTANTS: gc_save_file_name TYPE string VALUE '38_SAP-Icons.xlsx'.
-INCLUDE zdemo_excel_outputopt_incl.
-
-
-TABLES: icon.
-SELECT-OPTIONS: s_icon FOR icon-name DEFAULT 'ICON_LED_*' OPTION CP.
-
-START-OF-SELECTION.
- " Creates active sheet
- CREATE OBJECT lo_excel.
-
- " Get active sheet
- lo_worksheet = lo_excel->get_active_worksheet( ).
- lo_worksheet->set_title( ip_title = 'Demo Icons' ).
- lo_column = lo_worksheet->get_column( ip_column = 'A' ).
- lo_column->set_auto_size( 'X' ).
- lo_column = lo_worksheet->get_column( ip_column = 'B' ).
- lo_column->set_auto_size( 'X' ).
-
-* Get all icons
- SELECT name
- INTO TABLE lt_icon
- FROM icon
- WHERE name IN s_icon
- ORDER BY name.
- LOOP AT lt_icon ASSIGNING .
-
- lv_row = sy-tabix.
-*--------------------------------------------------------------------*
-* Set name of icon
-*--------------------------------------------------------------------*
- lo_worksheet->set_cell( ip_row = lv_row
- ip_column = 'A'
- ip_value = -name ).
-*--------------------------------------------------------------------*
-* Check whether the mime-repository holds some icondata for us
-*--------------------------------------------------------------------*
-
-* Get key
- SELECT SINGLE objid
- INTO -objid
- FROM wwwdata
- WHERE text = -name.
- CHECK sy-subrc = 0. " :o(
- lo_worksheet->set_cell( ip_row = lv_row
- ip_column = 'B'
- ip_value = -objid ).
-
-* Load mimedata
- CLEAR lt_mimedata.
- CLEAR ls_wwwdatatab.
- ls_wwwdatatab-relid = 'MI' .
- ls_wwwdatatab-objid = -objid.
- CALL FUNCTION 'WWWDATA_IMPORT'
- EXPORTING
- key = ls_wwwdatatab
- TABLES
- mime = lt_mimedata
- EXCEPTIONS
- wrong_object_type = 1
- import_error = 2
- OTHERS = 3.
- CHECK sy-subrc = 0. " :o(
-
- lo_drawing = lo_excel->add_new_drawing( ).
- lo_drawing->set_position( ip_from_row = lv_row
- ip_from_col = 'C' ).
- CLEAR lv_xstring.
- LOOP AT lt_mimedata ASSIGNING .
- CONCATENATE lv_xstring -line INTO lv_xstring IN BYTE MODE.
- ENDLOOP.
-
- lo_drawing->set_media( ip_media = lv_xstring
- ip_media_type = zcl_excel_drawing=>c_media_type_jpg
- ip_width = 16
- ip_height = 14 ).
- lo_worksheet->add_drawing( lo_drawing ).
-
- ENDLOOP.
-
-*** Create output
- lcl_output=>output( lo_excel ).
diff --git a/src/demos/zdemo_excel38.prog.xml b/src/demos/zdemo_excel38.prog.xml
deleted file mode 100644
index d4f0b87..0000000
--- a/src/demos/zdemo_excel38.prog.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-