├── .abapgit.xml
├── LICENSE
├── README.md
├── abaplint.jsonc
└── src
├── demo001
├── package.devc.xml
├── zcl_excel_demo1.clas.abap
├── zcl_excel_demo1.clas.xml
├── zdemo_excel1.prog.abap
├── zdemo_excel1.prog.xml
├── zdemo_excel1.w3mi.data.xlsx
└── zdemo_excel1.w3mi.xml
├── demo002
├── package.devc.xml
├── zcl_excel_demo2.clas.abap
├── zcl_excel_demo2.clas.xml
├── zdemo_excel2.prog.abap
├── zdemo_excel2.prog.xml
├── zdemo_excel2.w3mi.data.xlsx
└── zdemo_excel2.w3mi.xml
├── demo003
├── package.devc.xml
├── zdemo_excel3.prog.abap
├── zdemo_excel3.prog.xml
├── zdemo_excel3.w3mi.data.xlsx
└── zdemo_excel3.w3mi.xml
├── demo004
├── package.devc.xml
├── zcl_excel_demo4.clas.abap
├── zcl_excel_demo4.clas.xml
├── zdemo_excel4.prog.abap
├── zdemo_excel4.prog.xml
├── zdemo_excel4.w3mi.data.xlsx
└── zdemo_excel4.w3mi.xml
├── demo005
├── package.devc.xml
├── zcl_excel_demo5.clas.abap
├── zcl_excel_demo5.clas.xml
├── zdemo_excel5.prog.abap
├── zdemo_excel5.prog.xml
├── zdemo_excel5.w3mi.data.xlsx
└── zdemo_excel5.w3mi.xml
├── demo006
├── package.devc.xml
├── zcl_excel_demo6.clas.abap
├── zcl_excel_demo6.clas.xml
├── zdemo_excel6.prog.abap
├── zdemo_excel6.prog.xml
├── zdemo_excel6.w3mi.data.xlsx
└── zdemo_excel6.w3mi.xml
├── demo007
├── package.devc.xml
├── zcl_excel_demo7.clas.abap
├── zcl_excel_demo7.clas.xml
├── zdemo_excel7.prog.abap
├── zdemo_excel7.prog.xml
├── zdemo_excel7.w3mi.data.xlsx
└── zdemo_excel7.w3mi.xml
├── demo008
├── package.devc.xml
├── zcl_excel_demo8.clas.abap
├── zcl_excel_demo8.clas.xml
├── zdemo_excel8.prog.abap
├── zdemo_excel8.prog.xml
├── zdemo_excel8.w3mi.data.xlsx
└── zdemo_excel8.w3mi.xml
├── demo009
├── package.devc.xml
├── zdemo_excel9.prog.abap
├── zdemo_excel9.prog.xml
├── zdemo_excel9.w3mi.data.xlsx
└── zdemo_excel9.w3mi.xml
├── demo010
├── package.devc.xml
├── zdemo_excel10.prog.abap
├── zdemo_excel10.prog.xml
├── zdemo_excel10.w3mi.data.xlsx
└── zdemo_excel10.w3mi.xml
├── demo011
├── package.devc.xml
├── zdemo_excel11.prog.abap
├── zdemo_excel11.prog.xml
└── zexcel_s_org_rel.tabl.xml
├── demo012
├── package.devc.xml
├── zcl_excel_demo12.clas.abap
├── zcl_excel_demo12.clas.xml
├── zdemo_excel12.prog.abap
├── zdemo_excel12.prog.xml
├── zdemo_excel12.w3mi.data.xlsx
└── zdemo_excel12.w3mi.xml
├── demo013
├── package.devc.xml
├── zcl_excel_demo13.clas.abap
├── zcl_excel_demo13.clas.xml
├── zdemo_excel13.prog.abap
├── zdemo_excel13.prog.xml
├── zdemo_excel13.w3mi.data.xlsx
└── zdemo_excel13.w3mi.xml
├── demo014
├── package.devc.xml
├── zcl_excel_demo14.clas.abap
├── zcl_excel_demo14.clas.xml
├── zdemo_excel14.prog.abap
├── zdemo_excel14.prog.xml
├── zdemo_excel14.w3mi.data.xlsx
└── zdemo_excel14.w3mi.xml
├── demo015
├── package.devc.xml
├── zdemo_excel15.prog.abap
├── zdemo_excel15.prog.xml
├── zdemo_excel15_01.w3mi.data.xlsx
├── zdemo_excel15_01.w3mi.xml
├── zdemo_excel15_02.w3mi.data.xlsx
├── zdemo_excel15_02.w3mi.xml
├── zdemo_excel15_03.w3mi.data.xlsx
├── zdemo_excel15_03.w3mi.xml
├── zdemo_excel15_04.w3mi.data.xlsx
├── zdemo_excel15_04.w3mi.xml
├── zdemo_excel15_05.w3mi.data.xlsx
├── zdemo_excel15_05.w3mi.xml
├── zdemo_excel15_07.w3mi.data.xlsx
├── zdemo_excel15_07.w3mi.xml
├── zdemo_excel15_08.w3mi.data.xlsx
├── zdemo_excel15_08.w3mi.xml
├── zdemo_excel15_13.w3mi.data.xlsx
├── zdemo_excel15_13.w3mi.xml
├── zdemo_excel15_24.w3mi.data.xlsx
├── zdemo_excel15_24.w3mi.xml
├── zdemo_excel15_31.w3mi.data.xlsx
└── zdemo_excel15_31.w3mi.xml
├── demo016
├── package.devc.xml
├── zdemo_excel16.prog.abap
├── zdemo_excel16.prog.xml
├── zdemo_excel16.w3mi.data.xlsx
└── zdemo_excel16.w3mi.xml
├── demo017
├── package.devc.xml
├── zdemo_excel17.prog.abap
├── zdemo_excel17.prog.xml
├── zdemo_excel17.w3mi.data.xlsx
└── zdemo_excel17.w3mi.xml
├── demo018
├── package.devc.xml
├── zcl_excel_demo18.clas.abap
├── zcl_excel_demo18.clas.xml
├── zdemo_excel18.prog.abap
├── zdemo_excel18.prog.xml
├── zdemo_excel18.w3mi.data.xlsx
└── zdemo_excel18.w3mi.xml
├── demo019
├── package.devc.xml
├── zdemo_excel19.prog.abap
├── zdemo_excel19.prog.xml
├── zdemo_excel19.w3mi.data.xlsx
└── zdemo_excel19.w3mi.xml
├── demo020
├── package.devc.xml
├── zdemo_excel20.prog.abap
└── zdemo_excel20.prog.xml
├── demo021
├── package.devc.xml
├── zcl_excel_demo21.clas.abap
├── zcl_excel_demo21.clas.xml
├── zdemo_excel21.prog.abap
├── zdemo_excel21.prog.xml
├── zdemo_excel21.w3mi.data.xlsx
└── zdemo_excel21.w3mi.xml
├── demo022
├── package.devc.xml
├── zdemo_excel22.prog.abap
├── zdemo_excel22.prog.xml
├── zdemo_excel22.w3mi.data.xlsx
└── zdemo_excel22.w3mi.xml
├── demo023
├── package.devc.xml
├── zcl_excel_demo23.clas.abap
├── zcl_excel_demo23.clas.xml
├── zdemo_excel23.prog.abap
├── zdemo_excel23.prog.xml
├── zdemo_excel23.w3mi.data.xlsx
└── zdemo_excel23.w3mi.xml
├── demo024
├── package.devc.xml
├── zcl_excel_demo24.clas.abap
├── zcl_excel_demo24.clas.xml
├── zdemo_excel24.prog.abap
├── zdemo_excel24.prog.xml
├── zdemo_excel24.w3mi.data.xlsx
└── zdemo_excel24.w3mi.xml
├── demo025
├── package.devc.xml
├── zdemo_excel25.prog.abap
└── zdemo_excel25.prog.xml
├── demo026
├── package.devc.xml
├── zdemo_excel26.prog.abap
└── zdemo_excel26.prog.xml
├── demo027
├── package.devc.xml
├── zdemo_excel27.prog.abap
├── zdemo_excel27.prog.xml
├── zdemo_excel27.w3mi.data.xlsx
└── zdemo_excel27.w3mi.xml
├── demo028
├── package.devc.xml
├── zdemo_excel28.prog.abap
└── zdemo_excel28.prog.xml
├── demo029
├── package.devc.xml
├── zdemo_excel29.prog.abap
├── zdemo_excel29.prog.xml
├── zdemo_excel29_input.w3mi.data.xlsm
└── zdemo_excel29_input.w3mi.xml
├── demo030
├── package.devc.xml
├── zcl_excel_demo30.clas.abap
├── zcl_excel_demo30.clas.xml
├── zdemo_excel30.prog.abap
├── zdemo_excel30.prog.xml
├── zdemo_excel30.w3mi.data.xlsx
└── zdemo_excel30.w3mi.xml
├── demo031
├── package.devc.xml
├── zdemo_excel31.prog.abap
├── zdemo_excel31.prog.xml
├── zdemo_excel31.w3mi.data.xlsx
└── zdemo_excel31.w3mi.xml
├── demo032
├── package.devc.xml
├── zdemo_excel32.prog.abap
└── zdemo_excel32.prog.xml
├── demo033
├── package.devc.xml
├── zdemo_excel33.prog.abap
├── zdemo_excel33.prog.xml
├── zdemo_excel33.w3mi.data.xlsx
└── zdemo_excel33.w3mi.xml
├── demo034
├── package.devc.xml
├── zdemo_excel34.prog.abap
├── zdemo_excel34.prog.xml
├── zdemo_excel34.w3mi.data.xlsx
└── zdemo_excel34.w3mi.xml
├── demo035
├── package.devc.xml
├── zdemo_excel35.prog.abap
├── zdemo_excel35.prog.xml
├── zdemo_excel35.w3mi.data.xlsx
└── zdemo_excel35.w3mi.xml
├── demo036
├── package.devc.xml
├── zdemo_excel36.prog.abap
├── zdemo_excel36.prog.xml
├── zdemo_excel36.w3mi.data.xlsx
└── zdemo_excel36.w3mi.xml
├── demo037
├── package.devc.xml
├── zdemo_excel37.prog.abap
├── zdemo_excel37.prog.xml
├── zdemo_excel37.w3mi.data.xlsx
└── zdemo_excel37.w3mi.xml
├── demo038
├── package.devc.xml
├── zdemo_excel38.prog.abap
├── zdemo_excel38.prog.xml
├── zdemo_excel38.w3mi.data.xlsx
└── zdemo_excel38.w3mi.xml
├── demo039
├── package.devc.xml
├── zdemo_excel39.prog.abap
├── zdemo_excel39.prog.xml
├── zdemo_excel39.w3mi.data.xlsx
└── zdemo_excel39.w3mi.xml
├── demo040
├── package.devc.xml
├── zdemo_excel40.prog.abap
├── zdemo_excel40.prog.xml
├── zdemo_excel40.w3mi.data.xlsx
└── zdemo_excel40.w3mi.xml
├── demo041
├── package.devc.xml
├── zdemo_excel41.prog.abap
├── zdemo_excel41.prog.screen_9000.abap
├── zdemo_excel41.prog.xml
├── zdemo_excel41.w3mi.data.xlsx
└── zdemo_excel41.w3mi.xml
├── demo042
├── package.devc.xml
├── zdemo_excel42.prog.abap
├── zdemo_excel42.prog.xml
├── zdemo_excel42.w3mi.data.xlsx
└── zdemo_excel42.w3mi.xml
├── demo043
├── package.devc.xml
├── zdemo_excel43.prog.abap
└── zdemo_excel43.prog.xml
├── demo044
├── package.devc.xml
├── zdemo_excel44.prog.abap
└── zdemo_excel44.prog.xml
├── demo045
├── package.devc.xml
├── zdemo_excel45.prog.abap
├── zdemo_excel45.prog.xml
├── zdemo_excel45.w3mi.data.xlsx
└── zdemo_excel45.w3mi.xml
├── demo046
├── package.devc.xml
├── zdemo_excel46.prog.abap
├── zdemo_excel46.prog.xml
├── zdemo_excel46.w3mi.data.xlsx
└── zdemo_excel46.w3mi.xml
├── demo047
├── package.devc.xml
├── zdemo_excel47.prog.abap
├── zdemo_excel47.prog.xml
├── zdemo_excel47.w3mi.data.xlsx
└── zdemo_excel47.w3mi.xml
├── demo048
├── package.devc.xml
├── zdemo_excel48.prog.abap
├── zdemo_excel48.prog.xml
├── zdemo_excel48.w3mi.data.xlsx
└── zdemo_excel48.w3mi.xml
├── demo049
├── package.devc.xml
├── zdemo_excel49.prog.abap
├── zdemo_excel49.prog.xml
├── zdemo_excel49.w3mi.data.xlsx
└── zdemo_excel49.w3mi.xml
├── demo050
├── package.devc.xml
├── zdemo_excel50.prog.abap
└── zdemo_excel50.prog.xml
├── demo051
├── package.devc.xml
├── zdemo_excel51.prog.abap
└── zdemo_excel51.prog.xml
├── npl0018 89d0c0ce8687b56786306d6dd.sicf.xml
├── package.devc.xml
├── zabap2xlsx_demo_show.prog.abap
├── zabap2xlsx_demo_show.prog.xml
├── zangry_birds.prog.abap
├── zangry_birds.prog.xml
├── zdemo_calendar.prog.abap
├── zdemo_calendar.prog.xml
├── zdemo_calendar_classes.prog.abap
├── zdemo_calendar_classes.prog.xml
├── zdemo_excel.prog.abap
├── zdemo_excel.prog.xml
├── zdemo_excel_checker.prog.abap
├── zdemo_excel_checker.prog.xml
├── zdemo_excel_comments.prog.abap
├── zdemo_excel_comments.prog.xml
├── zdemo_excel_comments.w3mi.data.xlsx
├── zdemo_excel_comments.w3mi.xml
├── zdemo_excel_fill_template.prog.abap
├── zdemo_excel_fill_template.prog.xml
├── zdemo_excel_outputopt_incl.prog.abap
├── zdemo_excel_outputopt_incl.prog.xml
├── zdemo_excel_template.w3mi.data.xlsx
├── zdemo_excel_template.w3mi.xml
├── zdemo_excel_wda01.wdya.xml
├── zdemo_excel_wda01.wdyn.componentcontroller.abap
├── zdemo_excel_wda01.wdyn.v_main.abap
├── zdemo_excel_wda01.wdyn.w_main.abap
├── zdemo_excel_wda01.wdyn.xml
├── zdemo_teched1.prog.abap
├── zdemo_teched1.prog.xml
├── zdemo_teched10.prog.abap
├── zdemo_teched10.prog.xml
├── zdemo_teched2.prog.abap
├── zdemo_teched2.prog.xml
├── zdemo_teched3.prog.abap
├── zdemo_teched3.prog.xml
├── zdemo_teched4.prog.abap
├── zdemo_teched4.prog.xml
├── zdemo_teched5.prog.abap
├── zdemo_teched5.prog.xml
├── zdemo_teched6.prog.abap
├── zdemo_teched6.prog.xml
├── zdemo_teched7.prog.abap
├── zdemo_teched7.prog.xml
├── zdemo_teched8.prog.abap
├── zdemo_teched8.prog.xml
├── zdemo_teched9.prog.abap
├── zdemo_teched9.prog.xml
├── zexcel_export_dir.dtel.xml
├── zexcel_tr_docprops_core.xslt.source.xml
├── zexcel_tr_docprops_core.xslt.xml
├── zif_excel_demo_output.intf.abap
├── zif_excel_demo_output.intf.xml
├── ztest_excel_image_header.prog.abap
├── ztest_excel_image_header.prog.xml
├── ztest_excel_image_header.w3mi.data.xlsx
└── ztest_excel_image_header.w3mi.xml
/.abapgit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | E
6 | /src/
7 | PREFIX
8 |
9 | - /.gitignore
10 | - /LICENSE
11 | - /README.md
12 | - /package.json
13 | - /.travis.yml
14 | - /_config.yml
15 | - /abaplint.json
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # abap2xlsx demos
2 | Demonstration programs
3 |
4 | Report `ZABAP2XLSX_DEMO_SHOW` display all demo reports. Listed demo reports can be viewed and executed by double click.
5 |
6 | 
7 |
8 | # Troubleshooting
9 |
10 | ## Excel app opens instead of being displayed in the right container
11 |
12 | See [SAP add-ins don't display controls after update to Office 1806 or higher](https://learn.microsoft.com/en-us/office/troubleshoot/excel/sap-add-ins-not-display-control)
13 |
14 | Mark option "Optimize for compatibility"
15 |
16 | 
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/demo001/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo001/zcl_excel_demo1.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_excel_demo1 DEFINITION PUBLIC.
2 | PUBLIC SECTION.
3 | INTERFACES zif_excel_demo_output.
4 | ENDCLASS.
5 |
6 | CLASS zcl_excel_demo1 IMPLEMENTATION.
7 |
8 | METHOD zif_excel_demo_output~run.
9 |
10 | DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
11 | lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
12 | lo_column TYPE REF TO zcl_excel_column,
13 | lv_date TYPE d,
14 | lv_time TYPE t.
15 |
16 | CREATE OBJECT ro_excel.
17 |
18 | " Get active sheet
19 | lo_worksheet = ro_excel->get_active_worksheet( ).
20 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
21 | lv_date = '20211231'.
22 | lv_time = '055817'.
23 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = lv_date ).
24 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = lv_time ).
25 | lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://abap2xlsx.github.io/abap2xlsx' ).
26 | lo_worksheet->set_cell( ip_columnrow = 'B4' ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ).
27 |
28 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = '你好,世界' ).
29 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = '(Chinese)' ).
30 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 7 ip_value = 'नमस्ते दुनिया' ).
31 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 7 ip_value = '(Hindi)' ).
32 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 8 ip_value = 'Hola Mundo' ).
33 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 8 ip_value = '(Spanish)' ).
34 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'مرحبا بالعالم' ).
35 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 9 ip_value = '(Arabic)' ).
36 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 10 ip_value = 'ওহে বিশ্ব ' ).
37 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 10 ip_value = '(Bengali)' ).
38 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 11 ip_value = 'Bonjour le monde' ).
39 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 11 ip_value = '(French)' ).
40 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 12 ip_value = 'Olá Mundo' ).
41 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 12 ip_value = '(Portuguese)' ).
42 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 13 ip_value = 'Привет, мир' ).
43 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 13 ip_value = '(Russian)' ).
44 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 14 ip_value = 'ہیلو دنیا' ).
45 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 14 ip_value = '(Urdu)' ).
46 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 15 ip_value = '👋🌎, 👋🌍, 👋🌏' ).
47 | lo_worksheet->set_cell( ip_column = 'C' ip_row = 15 ip_value = '(Emoji waving hand + 3 parts of the world)' ).
48 |
49 | lo_column = lo_worksheet->get_column( ip_column = 'B' ).
50 | lo_column->set_width( ip_width = 11 ).
51 | ENDMETHOD.
52 |
53 | ENDCLASS.
54 |
--------------------------------------------------------------------------------
/src/demo001/zcl_excel_demo1.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO1
7 | E
8 | ZCL_EXCEL_DEMO1
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo001/zdemo_excel1.prog.abap:
--------------------------------------------------------------------------------
1 | REPORT zdemo_excel1.
2 |
3 | DATA lo_excel TYPE REF TO zcl_excel.
4 |
5 | CONSTANTS: gc_save_file_name TYPE string VALUE '01_HelloWorld.xlsx'.
6 | INCLUDE zdemo_excel_outputopt_incl.
7 |
8 |
9 | START-OF-SELECTION.
10 | lo_excel = zcl_excel_demo1=>zif_excel_demo_output~run( ).
11 |
12 | *** Create output
13 | lcl_output=>output( lo_excel ).
14 |
--------------------------------------------------------------------------------
/src/demo001/zdemo_excel1.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL1
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 28
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo001/zdemo_excel1.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo001/zdemo_excel1.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo001/zdemo_excel1.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL1
6 | 01_HelloWorld.xlsx (ZDEMO_EXCEL1)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 01_HelloWorld.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo002/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo002/zcl_excel_demo2.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO2
7 | E
8 | ZCL_EXCEL_DEMO2
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo002/zdemo_excel2.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL2
3 | *& Test Styles for ABAP2XLSX
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel2.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '02_Styles.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo2=>zif_excel_demo_output~run( ).
19 |
20 | lcl_output=>output( lo_excel ).
21 |
--------------------------------------------------------------------------------
/src/demo002/zdemo_excel2.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL2
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Styles
17 | 25
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo002/zdemo_excel2.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo002/zdemo_excel2.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo002/zdemo_excel2.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL2
6 | 02_Styles.xlsx (ZDEMO_EXCEL2)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 02_Styles.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo003/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo003/zdemo_excel3.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL3
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Export internal table
17 | 38
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo003/zdemo_excel3.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo003/zdemo_excel3.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo003/zdemo_excel3.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL3
6 | 03_iTab.xlsx (ZDEMO_EXCEL3)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 03_iTab.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo004/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo004/zcl_excel_demo4.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO4
7 | E
8 | ZCL_EXCEL_DEMO4
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo004/zdemo_excel4.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL4
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel4.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '04_Sheets.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo4=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo004/zdemo_excel4.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL4
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Create XLXS with multiple sheets
17 | 49
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo004/zdemo_excel4.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo004/zdemo_excel4.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo004/zdemo_excel4.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL4
6 | 04_Sheets.xlsx (ZDEMO_EXCEL4)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 04_Sheets.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo005/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo005/zcl_excel_demo5.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_excel_demo5 DEFINITION PUBLIC.
2 | PUBLIC SECTION.
3 | INTERFACES zif_excel_demo_output.
4 | ENDCLASS.
5 |
6 | CLASS zcl_excel_demo5 IMPLEMENTATION.
7 |
8 | METHOD zif_excel_demo_output~run.
9 |
10 | DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
11 | lo_style_cond TYPE REF TO zcl_excel_style_cond.
12 |
13 | DATA: ls_iconset TYPE zexcel_conditional_iconset.
14 |
15 | CREATE OBJECT ro_excel.
16 |
17 | " Get active sheet
18 | lo_worksheet = ro_excel->get_active_worksheet( ).
19 |
20 | lo_style_cond = lo_worksheet->add_new_style_cond( ).
21 | lo_style_cond->rule = zcl_excel_style_cond=>c_rule_iconset.
22 | lo_style_cond->priority = 1.
23 |
24 |
25 | ls_iconset-iconset = zcl_excel_style_cond=>c_iconset_3trafficlights2.
26 | ls_iconset-cfvo1_type = zcl_excel_style_cond=>c_cfvo_type_percent.
27 | ls_iconset-cfvo1_value = '0'.
28 | ls_iconset-cfvo2_type = zcl_excel_style_cond=>c_cfvo_type_percent.
29 | ls_iconset-cfvo2_value = '33'.
30 | ls_iconset-cfvo3_type = zcl_excel_style_cond=>c_cfvo_type_percent.
31 | ls_iconset-cfvo3_value = '66'.
32 | ls_iconset-showvalue = zcl_excel_style_cond=>c_showvalue_true.
33 |
34 | lo_style_cond->mode_iconset = ls_iconset.
35 | lo_style_cond->set_range( ip_start_column = 'C'
36 | ip_start_row = 4
37 | ip_stop_column = 'C'
38 | ip_stop_row = 8 ).
39 |
40 |
41 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 100 ).
42 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'C' ip_value = 1000 ).
43 | lo_worksheet->set_cell( ip_row = 6 ip_column = 'C' ip_value = 150 ).
44 | lo_worksheet->set_cell( ip_row = 7 ip_column = 'C' ip_value = 10 ).
45 | lo_worksheet->set_cell( ip_row = 8 ip_column = 'C' ip_value = 500 ).
46 |
47 |
48 | lo_style_cond = lo_worksheet->add_new_style_cond( ).
49 | lo_style_cond->rule = zcl_excel_style_cond=>c_rule_iconset.
50 | lo_style_cond->priority = 1.
51 | ls_iconset-iconset = zcl_excel_style_cond=>c_iconset_3trafficlights2.
52 | ls_iconset-showvalue = zcl_excel_style_cond=>c_showvalue_false.
53 | lo_style_cond->mode_iconset = ls_iconset.
54 | lo_style_cond->set_range( ip_start_column = 'E'
55 | ip_start_row = 4
56 | ip_stop_column = 'E'
57 | ip_stop_row = 8 ).
58 |
59 |
60 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'E' ip_value = 100 ).
61 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'E' ip_value = 1000 ).
62 | lo_worksheet->set_cell( ip_row = 6 ip_column = 'E' ip_value = 150 ).
63 | lo_worksheet->set_cell( ip_row = 7 ip_column = 'E' ip_value = 10 ).
64 | lo_worksheet->set_cell( ip_row = 8 ip_column = 'E' ip_value = 500 ).
65 | ENDMETHOD.
66 |
67 | ENDCLASS.
68 |
--------------------------------------------------------------------------------
/src/demo005/zcl_excel_demo5.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO5
7 | E
8 | ZCL_EXCEL_DEMO5
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo005/zdemo_excel5.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL5
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel5.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '05_Conditional.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 |
19 | lo_excel = zcl_excel_demo5=>zif_excel_demo_output~run( ).
20 |
21 | *** Create output
22 | lcl_output=>output( lo_excel ).
23 |
--------------------------------------------------------------------------------
/src/demo005/zdemo_excel5.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL5
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Conditinal formating
17 | 36
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo005/zdemo_excel5.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo005/zdemo_excel5.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo005/zdemo_excel5.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL5
6 | 05_Conditional.xlsx (ZDEMO_EXCEL5)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 05_Conditional.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo006/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo006/zcl_excel_demo6.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_excel_demo6 DEFINITION PUBLIC.
2 | PUBLIC SECTION.
3 | INTERFACES zif_excel_demo_output.
4 | ENDCLASS.
5 |
6 | CLASS zcl_excel_demo6 IMPLEMENTATION.
7 |
8 | METHOD zif_excel_demo_output~run.
9 |
10 | DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
11 | lv_row TYPE i,
12 | lv_formula TYPE string.
13 |
14 |
15 | CREATE OBJECT ro_excel.
16 |
17 | " Get active sheet
18 | lo_worksheet = ro_excel->get_active_worksheet( ).
19 |
20 | *--------------------------------------------------------------------*
21 | * Get some testdata
22 | *--------------------------------------------------------------------*
23 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 100 ).
24 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'C' ip_value = 1000 ).
25 | lo_worksheet->set_cell( ip_row = 6 ip_column = 'C' ip_value = 150 ).
26 | lo_worksheet->set_cell( ip_row = 7 ip_column = 'C' ip_value = -10 ).
27 | lo_worksheet->set_cell( ip_row = 8 ip_column = 'C' ip_value = 500 ).
28 |
29 |
30 | *--------------------------------------------------------------------*
31 | * Demonstrate using formulas
32 | *--------------------------------------------------------------------*
33 | lo_worksheet->set_cell( ip_row = 9 ip_column = 'C' ip_formula = 'SUM(C4:C8)' ).
34 |
35 |
36 | *--------------------------------------------------------------------*
37 | * Demonstrate standard EXCEL-behaviour when copying a formula to another cell
38 | * by calculating the resulting formula to put into another cell
39 | *--------------------------------------------------------------------*
40 | DO 10 TIMES.
41 |
42 | lv_formula = zcl_excel_common=>shift_formula( iv_reference_formula = 'SUM(C4:C8)'
43 | iv_shift_cols = 0 " Offset in Columns - here we copy in same column --> 0
44 | iv_shift_rows = sy-index ). " Offset in Row - here we copy downward --> sy-index
45 | lv_row = 9 + sy-index. " Absolute row = sy-index rows below reference cell
46 | lo_worksheet->set_cell( ip_row = lv_row ip_column = 'C' ip_formula = lv_formula ).
47 |
48 | ENDDO.
49 | ENDMETHOD.
50 |
51 | ENDCLASS.
52 |
--------------------------------------------------------------------------------
/src/demo006/zcl_excel_demo6.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO6
7 | E
8 | ZCL_EXCEL_DEMO6
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo006/zdemo_excel6.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL6
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel6.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '06_Formulas.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo6=>zif_excel_demo_output~run( ).
19 |
20 | *--------------------------------------------------------------------*
21 | *** Create output
22 | *--------------------------------------------------------------------*
23 | lcl_output=>output( lo_excel ).
24 |
--------------------------------------------------------------------------------
/src/demo006/zdemo_excel6.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL6
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Formulas
17 | 25
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo006/zdemo_excel6.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo006/zdemo_excel6.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo006/zdemo_excel6.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL6
6 | 06_Formulas.xlsx (ZDEMO_EXCEL6)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 06_Formulas.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo007/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo007/zcl_excel_demo7.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO7
7 | E
8 | ZCL_EXCEL_DEMO7
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo007/zdemo_excel7.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL7
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel7.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '07_ConditionalAll.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo7=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo007/zdemo_excel7.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL7
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: All conditional formating possibilities
17 | 56
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo007/zdemo_excel7.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo007/zdemo_excel7.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo007/zdemo_excel7.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL7
6 | 07_ConditionalAll.xlsx (ZDEMO_EXCEL7)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 07_ConditionalAll.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo008/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo008/zcl_excel_demo8.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_excel_demo8 DEFINITION PUBLIC.
2 | PUBLIC SECTION.
3 | INTERFACES zif_excel_demo_output.
4 | ENDCLASS.
5 |
6 | CLASS zcl_excel_demo8 IMPLEMENTATION.
7 |
8 | METHOD zif_excel_demo_output~run.
9 |
10 | DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
11 | lo_range TYPE REF TO zcl_excel_range.
12 |
13 | DATA: lv_title TYPE zexcel_sheet_title.
14 |
15 | CREATE OBJECT ro_excel.
16 |
17 | " Get active sheet
18 | lo_worksheet = ro_excel->get_active_worksheet( ).
19 | lv_title = 'Sheet1'.
20 | lo_worksheet->set_title( lv_title ).
21 | lo_range = ro_excel->add_new_range( ).
22 | lo_range->name = 'range'.
23 | lo_range->set_value( ip_sheet_name = lv_title
24 | ip_start_column = 'C'
25 | ip_start_row = 4
26 | ip_stop_column = 'C'
27 | ip_stop_row = 8 ).
28 |
29 |
30 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 'Apple' ).
31 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'C' ip_value = 'Banana' ).
32 | lo_worksheet->set_cell( ip_row = 6 ip_column = 'C' ip_value = 'Blueberry' ).
33 | lo_worksheet->set_cell( ip_row = 7 ip_column = 'C' ip_value = 'Ananas' ).
34 | lo_worksheet->set_cell( ip_row = 8 ip_column = 'C' ip_value = 'Grapes' ).
35 |
36 | " Define another Range with a name longer than 40 characters that
37 | " tests the fix of issue #168 ranges namescan be only up to 20 chars
38 |
39 | lo_range = ro_excel->add_new_range( ).
40 | lo_range->name = 'A_range_with_a_name_that_is_longer_than_20_characters'.
41 | lo_range->set_value( ip_sheet_name = lv_title
42 | ip_start_column = 'D'
43 | ip_start_row = 4
44 | ip_stop_column = 'D'
45 | ip_stop_row = 5 ).
46 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'D' ip_value = 'Range Value 1' ).
47 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'D' ip_value = 'Range Value 2' ).
48 |
49 | " issue #163
50 | " Define another Range with sheet visibility
51 | lo_range = lo_worksheet->add_new_range( ).
52 | lo_range->name = 'A_range_with_sheet_visibility'.
53 | lo_range->set_value( ip_sheet_name = lv_title
54 | ip_start_column = 'E'
55 | ip_start_row = 4
56 | ip_stop_column = 'E'
57 | ip_stop_row = 5 ).
58 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'E' ip_value = 'Range Value 3' ).
59 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'E' ip_value = 'Range Value 4' ).
60 | " issue #163
61 | ENDMETHOD.
62 |
63 | ENDCLASS.
64 |
--------------------------------------------------------------------------------
/src/demo008/zcl_excel_demo8.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO8
7 | E
8 | ZCL_EXCEL_DEMO8
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo008/zdemo_excel8.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL8
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel8.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '08_Range.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo8=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo008/zdemo_excel8.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL8
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Define a range
17 | 31
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo008/zdemo_excel8.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo008/zdemo_excel8.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo008/zdemo_excel8.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL8
6 | 08_Range.xlsx (ZDEMO_EXCEL8)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 08_Range.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo009/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo009/zdemo_excel9.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL9
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Data validations
17 | 33
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo009/zdemo_excel9.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo009/zdemo_excel9.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo009/zdemo_excel9.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL9
6 | 09_DataValidation.xlsx (ZDEMO_EXCEL9)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 09_DataValidation.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo010/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo010/zdemo_excel10.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL10
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Format internal table with field catalog
17 | 57
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo010/zdemo_excel10.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo010/zdemo_excel10.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo010/zdemo_excel10.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL10
6 | 10_iTabFieldCatalog.xlsx (ZDEMO_EXCEL10)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 10_iTabFieldCatalog.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo011/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo011/zdemo_excel11.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL11
7 | 1
8 | K
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Export Organisation and Contact Persons
17 | 55
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo011/zexcel_s_org_rel.tabl.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZEXCEL_S_ORG_REL
7 | E
8 | INTTAB
9 | X
10 | Organization & Contact Person download
11 | 1
12 |
13 |
14 |
15 | ORG_GUID
16 | BAPIGUID
17 | 0
18 | E
19 |
20 |
21 | CONTPERS_GUID
22 | BAPIGUID
23 | 0
24 | E
25 |
26 |
27 | ORG_NUMBER
28 | BU_PARTNER
29 | 0
30 | D
31 | E
32 |
33 |
34 | CONTPERS_NUMBER
35 | BU_PARTNER
36 | 0
37 | D
38 | E
39 |
40 |
41 | .INCLUDE
42 | 0
43 | BAPIBUS1006_CENTRAL_ORGAN
44 | S
45 | SAP BP: BAPI Structure for Organization Data
46 | S
47 |
48 |
49 | .INCLUDE
50 | 0
51 | LANGU
52 | BAPIBUS1006_ADDRESS
53 | S
54 | SAP BP: BAPI Structure for Address Data
55 | S
56 |
57 |
58 | .INCLUDE
59 | 0
60 | BAPIBUS1006_CENTRAL_PERSON
61 | S
62 | SAP BP: BAPI Structure for Personal Data
63 | S
64 |
65 |
66 | .INCLUDE
67 | 0
68 | BAPIBUS1006002_CENTRAL
69 | S
70 | SAP BP, CP Rel.: BAPI Structure for Central Data
71 | S
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/src/demo012/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo012/zcl_excel_demo12.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO12
7 | E
8 | ZCL_EXCEL_DEMO12
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo012/zdemo_excel12.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL12
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel12.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '12_HideSizeOutlineRowsAndColumns.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 | START-OF-SELECTION.
17 | lo_excel = zcl_excel_demo12=>zif_excel_demo_output~run( ).
18 |
19 | *** Create output
20 | lcl_output=>output( lo_excel ).
21 |
--------------------------------------------------------------------------------
/src/demo012/zdemo_excel12.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL12
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hide Columns
17 | 29
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo012/zdemo_excel12.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo012/zdemo_excel12.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo012/zdemo_excel12.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL12
6 | 12_HideSizeOutlineRowsAndColumns.xlsx (ZDEMO_EXCEL12)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 12_HideSizeOutlineRowsAndColumns.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo013/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo013/zcl_excel_demo13.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO13
7 | E
8 | ZCL_EXCEL_DEMO13
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo013/zdemo_excel13.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL13
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *& Example by: Alvaro "Blag" Tejada Galindo.
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel13.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '13_MergedCells.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 | START-OF-SELECTION.
17 | lo_excel = zcl_excel_demo13=>zif_excel_demo_output~run( ).
18 |
19 | *** Create output
20 | lcl_output=>output( lo_excel ).
21 |
--------------------------------------------------------------------------------
/src/demo013/zdemo_excel13.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL13
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Merge cells
17 | 28
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo013/zdemo_excel13.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo013/zdemo_excel13.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo013/zdemo_excel13.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL13
6 | 13_MergedCells.xlsx (ZDEMO_EXCEL13)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 13_MergedCells.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo014/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo014/zcl_excel_demo14.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO14
7 | E
8 | ZCL_EXCEL_DEMO14
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo014/zdemo_excel14.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL14
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel14.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '14_Alignment.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo14=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo014/zdemo_excel14.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL14
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Alignment
17 | 26
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo014/zdemo_excel14.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo014/zdemo_excel14.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo014/zdemo_excel14.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL14
6 | 14_Alignment.xlsx (ZDEMO_EXCEL14)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 14_Alignment.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL15
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Reader
17 | 22
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_01.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_01.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_01.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_01
6 | 15_01_HelloWorldFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_01_HelloWorldFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_02.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_02.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_02.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_02
6 | 15_02_StylesFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_02_StylesFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_03.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_03.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_03.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_03
6 | 15_03_iTabFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_03_iTabFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_04.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_04.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_04.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_04
6 | 15_04_SheetsFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_04_SheetsFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_05.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_05.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_05.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_05
6 | 15_05_ConditionalFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_05_ConditionalFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_07.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_07.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_07.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_07
6 | 15_07_ConditionalAllFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_07_ConditionalAllFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_08.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_08.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_08.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_08
6 | 15_08_RangeFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_08_RangeFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_13.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_13.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_13.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_13
6 | 15_13_MergedCellsFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_13_MergedCellsFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_24.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_24.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_24.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_24
6 | 15_24_Sheets_with_different_default_date_formatsFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_24_Sheets_with_different_default_date_formatsFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_31.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo015/zdemo_excel15_31.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo015/zdemo_excel15_31.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL15_31
6 | 15_31_AutosizeWithDifferentFontSizesFromReader.xlsx (ZDEMO_EXCEL15)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 15_31_AutosizeWithDifferentFontSizesFromReader.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo016/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo016/zdemo_excel16.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL16
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | I
16 | B01
17 | Web Repository file
18 | 83
19 |
20 | -
21 | I
22 | B02
23 | Frontend file
24 | 83
25 |
26 | -
27 | I
28 | B03
29 | MIME Repository file
30 | 83
31 |
32 | -
33 | I
34 | BL1
35 | Output options
36 | 24
37 |
38 | -
39 | R
40 | abap2xlsx Demo: Drawings
41 | 24
42 |
43 | -
44 | S
45 | POBJTYPE
46 | .
47 | 9
48 | D
49 |
50 | -
51 | S
52 | P_CLASS
53 | .
54 | 9
55 | D
56 |
57 | -
58 | S
59 | P_FILE
60 | Frontend file path
61 | 26
62 |
63 | -
64 | S
65 | P_MOBJID
66 | .
67 | 9
68 | D
69 |
70 | -
71 | S
72 | P_PATH
73 | 26
74 |
75 | -
76 | S
77 | P_WOBJID
78 | Image ID (Binary Data)
79 | 30
80 |
81 | -
82 | S
83 | RB_INTRN
84 | Internal file (hardcoded)
85 | 33
86 |
87 | -
88 | S
89 | RB_PATH
90 | File stored on frontend
91 | 31
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/src/demo016/zdemo_excel16.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo016/zdemo_excel16.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo016/zdemo_excel16.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL16
6 | 16_Drawings.xlsx (ZDEMO_EXCEL16)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 16_Drawings.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo017/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo017/zdemo_excel17.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL17
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel17.
10 |
11 | DATA: lo_excel TYPE REF TO zcl_excel,
12 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
13 | lo_style_protection TYPE REF TO zcl_excel_style,
14 | lv_style_protection_guid TYPE zexcel_cell_style,
15 | lo_style TYPE REF TO zcl_excel_style,
16 | lv_style TYPE zexcel_cell_style.
17 |
18 |
19 | CONSTANTS: gc_save_file_name TYPE string VALUE '17_SheetProtection.xlsx'.
20 | INCLUDE zdemo_excel_outputopt_incl.
21 |
22 | PARAMETERS: p_pwd TYPE zexcel_aes_password LOWER CASE DEFAULT 'secret'.
23 |
24 | START-OF-SELECTION.
25 |
26 | CREATE OBJECT lo_excel.
27 |
28 | " Get active sheet
29 | lo_worksheet = lo_excel->get_active_worksheet( ).
30 | lo_worksheet->zif_excel_sheet_protection~protected = zif_excel_sheet_protection=>c_protected.
31 | * lo_worksheet->zif_excel_sheet_protection~password = 'DAA7'. "it is the encoded word "secret"
32 | lo_worksheet->zif_excel_sheet_protection~password = zcl_excel_common=>encrypt_password( p_pwd ).
33 | lo_worksheet->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_active.
34 | lo_worksheet->zif_excel_sheet_protection~objects = zif_excel_sheet_protection=>c_active.
35 | lo_worksheet->zif_excel_sheet_protection~scenarios = zif_excel_sheet_protection=>c_active.
36 | " First style to unlock a cell
37 | lo_style_protection = lo_excel->add_new_style( ).
38 | lo_style_protection->protection->locked = zcl_excel_style_protection=>c_protection_unlocked.
39 | lv_style_protection_guid = lo_style_protection->get_guid( ).
40 | " Another style which should not affect the unlock style
41 | lo_style = lo_excel->add_new_style( ).
42 | lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid.
43 | lo_style->fill->fgcolor-rgb = 'FFCC3333'.
44 | lv_style = lo_style->get_guid( ).
45 | 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 ).
46 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
47 | lo_worksheet->set_cell( ip_row = 5 ip_column = 'C' ip_value = 'This cell is locked as all the others empty cell' ).
48 | lo_worksheet->set_cell( ip_row = 6 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
49 | lo_worksheet->set_cell( ip_row = 7 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
50 | lo_worksheet->set_cell( ip_row = 8 ip_column = 'C' ip_value = 'This cell is locked as all the others empty cell' ).
51 |
52 | *** Create output
53 | lcl_output=>output( lo_excel ).
54 |
--------------------------------------------------------------------------------
/src/demo017/zdemo_excel17.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL17
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Sheet Protection
17 | 33
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo017/zdemo_excel17.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo017/zdemo_excel17.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo017/zdemo_excel17.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL17
6 | 17_SheetProtection.xlsx (ZDEMO_EXCEL17)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 17_SheetProtection.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo018/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo018/zcl_excel_demo18.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_excel_demo18 DEFINITION PUBLIC.
2 | PUBLIC SECTION.
3 | INTERFACES zif_excel_demo_output.
4 | ENDCLASS.
5 |
6 | CLASS zcl_excel_demo18 IMPLEMENTATION.
7 |
8 | METHOD zif_excel_demo_output~run.
9 |
10 | DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
11 | lv_style_protection_guid TYPE zexcel_cell_style.
12 |
13 | CREATE OBJECT ro_excel.
14 |
15 | " Get active sheet
16 | ro_excel->zif_excel_book_protection~protected = zif_excel_book_protection=>c_protected.
17 | ro_excel->zif_excel_book_protection~lockrevision = zif_excel_book_protection=>c_locked.
18 | ro_excel->zif_excel_book_protection~lockstructure = zif_excel_book_protection=>c_locked.
19 | ro_excel->zif_excel_book_protection~lockwindows = zif_excel_book_protection=>c_locked.
20 |
21 | lo_worksheet = ro_excel->get_active_worksheet( ).
22 | lo_worksheet->set_cell( ip_row = 4 ip_column = 'C' ip_value = 'This cell is unlocked' ip_style = lv_style_protection_guid ).
23 |
24 | ENDMETHOD.
25 |
26 | ENDCLASS.
27 |
--------------------------------------------------------------------------------
/src/demo018/zcl_excel_demo18.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO18
7 | E
8 | ZCL_EXCEL_DEMO18
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo018/zdemo_excel18.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL18
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel18.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '18_BookProtection.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo18=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo018/zdemo_excel18.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL18
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Book protection
17 | 32
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo018/zdemo_excel18.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo018/zdemo_excel18.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo018/zdemo_excel18.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL18
6 | 18_BookProtection.xlsx (ZDEMO_EXCEL18)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 18_BookProtection.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo019/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo019/zdemo_excel19.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL19
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel19.
10 |
11 | DATA: lo_excel TYPE REF TO zcl_excel,
12 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
13 |
14 |
15 | CONSTANTS: gc_save_file_name TYPE string VALUE '19_SetActiveSheet.xlsx'.
16 | INCLUDE zdemo_excel_outputopt_incl.
17 |
18 | PARAMETERS: p_noout TYPE abap_bool DEFAULT abap_true.
19 |
20 |
21 | START-OF-SELECTION.
22 |
23 | CREATE OBJECT lo_excel.
24 |
25 | " First Worksheet
26 | lo_worksheet = lo_excel->get_active_worksheet( ).
27 | lo_worksheet->set_title( 'First' ).
28 | lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 1' ).
29 |
30 | " Second Worksheet
31 | lo_worksheet = lo_excel->add_new_worksheet( ).
32 | lo_worksheet->set_title( 'Second' ).
33 | lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 2' ).
34 |
35 | " Third Worksheet
36 | lo_worksheet = lo_excel->add_new_worksheet( ).
37 | lo_worksheet->set_title( 'Third' ).
38 | lo_worksheet->set_cell( ip_row = 1 ip_column = 'A' ip_value = 'This is Sheet 3' ).
39 |
40 | IF p_noout EQ abap_false.
41 | DATA: active_sheet_index TYPE zexcel_active_worksheet.
42 | active_sheet_index = lo_excel->get_active_sheet_index( ).
43 | WRITE: 'Sheet Index before: ', active_sheet_index.
44 | ENDIF.
45 | lo_excel->set_active_sheet_index( '2' ).
46 | IF p_noout EQ abap_false.
47 | active_sheet_index = lo_excel->get_active_sheet_index( ).
48 | WRITE: 'Sheet Index after: ', active_sheet_index.
49 | ENDIF.
50 |
51 |
52 | *** Create output
53 | lcl_output=>output( lo_excel ).
54 |
--------------------------------------------------------------------------------
/src/demo019/zdemo_excel19.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL19
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Set active sheet
17 | 33
18 |
19 |
20 |
21 | -
22 | D
23 |
24 |
-
25 | S
26 | P_NOOUT
27 | Hide output
28 | 19
29 |
30 | -
31 | S
32 | P_PATH
33 | .
34 | 26
35 | D
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/demo019/zdemo_excel19.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo019/zdemo_excel19.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo019/zdemo_excel19.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL19
6 | 19_SetActiveSheet.xlsx (ZDEMO_EXCEL19)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 19_SetActiveSheet.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo020/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo021/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo021/zcl_excel_demo21.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO21
7 | E
8 | ZCL_EXCEL_DEMO21
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo021/zdemo_excel21.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL21
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel21.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '21_BackgroundColorPicker.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo21=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo021/zdemo_excel21.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL21
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo:
17 | 15
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo021/zdemo_excel21.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo021/zdemo_excel21.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo021/zdemo_excel21.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL21
6 | 21_BackgroundColorPicker.xlsx (ZDEMO_EXCEL21)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 21_BackgroundColorPicker.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo022/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo022/zdemo_excel22.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL22
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Export internal table
17 | 38
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo022/zdemo_excel22.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo022/zdemo_excel22.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo022/zdemo_excel22.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL22
6 | 22_itab_fieldcatalog.xlsx (ZDEMO_EXCEL22)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 22_itab_fieldcatalog.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo023/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo023/zcl_excel_demo23.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO23
7 | E
8 | ZCL_EXCEL_DEMO23
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo023/zdemo_excel23.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL23
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel23.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '23_Sheets_with_and_without_grid_lines.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo23=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo023/zdemo_excel23.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL23
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Multiple sheets with and w/o grid lines, print options
17 | 70
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo023/zdemo_excel23.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo023/zdemo_excel23.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo023/zdemo_excel23.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL23
6 | 23_Sheets_with_and_without_grid_lines.xlsx (ZDEMO_EXCEL23)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 23_Sheets_with_and_without_grid_lines.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo024/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo024/zcl_excel_demo24.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO24
7 | E
8 | ZCL_EXCEL_DEMO24
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo024/zdemo_excel24.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL23
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel24.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '24_Sheets_with_different_default_date_formats.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo24=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo024/zdemo_excel24.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL24
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Multiple sheets with different default date formats
17 | 67
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo024/zdemo_excel24.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo024/zdemo_excel24.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo024/zdemo_excel24.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL24
6 | 24_Sheets_with_different_default_date_formats.xlsx (ZDEMO_EXCEL24)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 24_Sheets_with_different_default_date_formats.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo025/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo025/zdemo_excel25.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL25
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Write Hello World using Logical Path on the App Server
17 | 70
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo026/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo027/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo027/zdemo_excel27.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL27
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Data conditional formatting with styles
17 | 56
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo027/zdemo_excel27.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo027/zdemo_excel27.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo027/zdemo_excel27.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL27
6 | 27_ConditionalFormatting.xlsx (ZDEMO_EXCEL27)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 27_ConditionalFormatting.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo028/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo028/zdemo_excel28.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL28
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: export in CSV
17 | 29
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo029/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo029/zdemo_excel29.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL29
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Macro-Enabled workbook
17 | 38
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo029/zdemo_excel29_input.w3mi.data.xlsm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo029/zdemo_excel29_input.w3mi.data.xlsm
--------------------------------------------------------------------------------
/src/demo029/zdemo_excel29_input.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL29_INPUT
6 | abap2xlsx resources/TestMacro.xlsm
7 |
8 |
9 | fileextension
10 | .xlsm
11 |
12 |
13 | filename
14 | TestMacro.xlsm
15 |
16 |
17 | mimetype
18 | application/vnd.ms-excel.sheet.macroEnabled
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo030/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo030/zcl_excel_demo30.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_EXCEL_DEMO30
7 | E
8 | ZCL_EXCEL_DEMO30
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/demo030/zdemo_excel30.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL1
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel30.
10 |
11 | DATA lo_excel TYPE REF TO zcl_excel.
12 |
13 | CONSTANTS: gc_save_file_name TYPE string VALUE '30_CellDataTypes.xlsx'.
14 | INCLUDE zdemo_excel_outputopt_incl.
15 |
16 |
17 | START-OF-SELECTION.
18 | lo_excel = zcl_excel_demo30=>zif_excel_demo_output~run( ).
19 |
20 | *** Create output
21 | lcl_output=>output( lo_excel ).
22 |
--------------------------------------------------------------------------------
/src/demo030/zdemo_excel30.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL30
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: ABAP Cell data types
17 | 37
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo030/zdemo_excel30.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo030/zdemo_excel30.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo030/zdemo_excel30.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL30
6 | 30_CellDataTypes.xlsx (ZDEMO_EXCEL30)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 30_CellDataTypes.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo031/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo031/zdemo_excel31.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL31
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Autosize Column with different Font sizes
17 | 58
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo031/zdemo_excel31.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo031/zdemo_excel31.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo031/zdemo_excel31.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL31
6 | 31_AutosizeWithDifferentFontSizes.xlsx (ZDEMO_EXCEL31)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 31_AutosizeWithDifferentFontSizes.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo032/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo033/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo033/zdemo_excel33.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL33
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Autofilter
17 | 26
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo033/zdemo_excel33.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo033/zdemo_excel33.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo033/zdemo_excel33.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL33
6 | 33_autofilter.xlsx (ZDEMO_EXCEL33)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 33_autofilter.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo034/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo034/zdemo_excel34.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL34
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Static Styles (Chess)
17 | 37
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo034/zdemo_excel34.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo034/zdemo_excel34.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo034/zdemo_excel34.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL34
6 | 34_Static Styles_Chess.xlsx (ZDEMO_EXCEL34)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 34_Static Styles_Chess.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo035/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo035/zdemo_excel35.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL35
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: static styles
17 | 33
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo035/zdemo_excel35.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo035/zdemo_excel35.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo035/zdemo_excel35.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL35
6 | 35_Static_Styles.xlsx (ZDEMO_EXCEL35)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 35_Static_Styles.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo036/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo036/zdemo_excel36.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL36
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Default Styles
17 | 31
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo036/zdemo_excel36.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo036/zdemo_excel36.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo036/zdemo_excel36.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL36
6 | 36_DefaultStyles.xlsx (ZDEMO_EXCEL36)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 36_DefaultStyles.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo037/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo037/zdemo_excel37.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo037/zdemo_excel37.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo037/zdemo_excel37.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL37
6 | 37- Read template and output.xlsx (ZDEMO_EXCEL37)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 37- Read template and output.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo038/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo038/zdemo_excel38.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL38
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Read file and output
17 | 36
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo038/zdemo_excel38.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo038/zdemo_excel38.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo038/zdemo_excel38.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL38
6 | 38_SAP-Icons.xlsx (ZDEMO_EXCEL38)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 38_SAP-Icons.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo039/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo039/zdemo_excel39.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL39
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Drawings
17 | 24
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo039/zdemo_excel39.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo039/zdemo_excel39.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo039/zdemo_excel39.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL39
6 | 39_Charts.xlsx (ZDEMO_EXCEL39)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 39_Charts.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo040/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo040/zdemo_excel40.prog.abap:
--------------------------------------------------------------------------------
1 | REPORT zdemo_excel40.
2 |
3 |
4 | DATA: lo_excel TYPE REF TO zcl_excel,
5 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
6 | lo_style_changer TYPE REF TO zif_excel_style_changer.
7 |
8 | CONSTANTS: gc_save_file_name TYPE string VALUE '40_Printsettings.xlsx'.
9 | INCLUDE zdemo_excel_outputopt_incl.
10 |
11 |
12 |
13 | START-OF-SELECTION.
14 | " Creates active sheet
15 | CREATE OBJECT lo_excel.
16 |
17 | " Get active sheet
18 | lo_worksheet = lo_excel->get_active_worksheet( ).
19 | lo_worksheet->set_title( ip_title = 'Demo Printsettings' ).
20 |
21 | *--------------------------------------------------------------------*
22 | * Prepare sheet with trivial data
23 | * - first 4 columns will have fontocolor set
24 | * - first 3 rows will have fontcolor set
25 | * These marked cells will be used for repeatable rows/columns on printpages
26 | *--------------------------------------------------------------------*
27 | lo_worksheet->set_area(
28 | ip_range = 'A1:T100'
29 | ip_formula = 'CHAR(64+COLUMN())&TEXT(ROW(),"????????0")'
30 | ip_area = lo_worksheet->c_area-whole ).
31 |
32 | lo_style_changer = zcl_excel_style_changer=>create( lo_excel ).
33 | lo_style_changer->set_fill_filltype( zcl_excel_style_fill=>c_fill_solid ).
34 | lo_style_changer->set_fill_fgcolor_rgb( zcl_excel_style_color=>c_yellow ).
35 | lo_worksheet->change_area_style(
36 | ip_range = 'A1:T3'
37 | ip_style_changer = lo_style_changer ).
38 |
39 | lo_style_changer = zcl_excel_style_changer=>create( lo_excel ).
40 | lo_style_changer->set_font_color_rgb( zcl_excel_style_color=>c_red ).
41 | lo_worksheet->change_area_style(
42 | ip_range = 'A1:D100'
43 | ip_style_changer = lo_style_changer ).
44 |
45 | *--------------------------------------------------------------------*
46 | * Printsettings
47 | *--------------------------------------------------------------------*
48 | TRY.
49 | lo_worksheet->zif_excel_sheet_printsettings~set_print_repeat_columns( iv_columns_from = 'A'
50 | iv_columns_to = 'D' ).
51 | lo_worksheet->zif_excel_sheet_printsettings~set_print_repeat_rows( iv_rows_from = 1
52 | iv_rows_to = 3 ).
53 | CATCH zcx_excel .
54 | ENDTRY.
55 |
56 | *** Create output
57 | lcl_output=>output( lo_excel ).
58 |
--------------------------------------------------------------------------------
/src/demo040/zdemo_excel40.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL40
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Area and Print settings
17 | 39
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo040/zdemo_excel40.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo040/zdemo_excel40.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo040/zdemo_excel40.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL40
6 | 40_Printsettings.xlsx (ZDEMO_EXCEL40)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 40_Printsettings.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo041/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo041/zdemo_excel41.prog.screen_9000.abap:
--------------------------------------------------------------------------------
1 | PROCESS BEFORE OUTPUT.
2 | MODULE status_9000.
3 |
4 | PROCESS AFTER INPUT.
5 | MODULE user_command_9000 AT EXIT-COMMAND.
6 | MODULE user_command_9000.
7 |
--------------------------------------------------------------------------------
/src/demo041/zdemo_excel41.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo041/zdemo_excel41.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo041/zdemo_excel41.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL41
6 | ABAP2XLSX Inheritance.xlsx (ZDEMO_EXCEL41)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | ABAP2XLSX Inheritance.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo042/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo042/zdemo_excel42.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL42
7 | 1
8 | *
9 | K
10 | E
11 | X
12 | X
13 |
14 |
15 | -
16 | R
17 | abap2xlsx Demo: Theme manipulation demo
18 | 39
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo042/zdemo_excel42.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo042/zdemo_excel42.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo042/zdemo_excel42.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL42
6 | 42 Theme Manipulation demo.xlsx (ZDEMO_EXCEL42)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 42 Theme Manipulation demo.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo043/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo043/zdemo_excel43.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL43
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel43.
10 |
11 | "
12 | "Locally created Structure, which should be equal to the excels structure
13 | "
14 | TYPES: BEGIN OF lty_excel_s,
15 | dummy TYPE dummy.
16 | TYPES: END OF lty_excel_s.
17 |
18 | DATA lt_tab TYPE TABLE OF lty_excel_s.
19 | DATA: lt_filetable TYPE filetable,
20 | ls_filetable TYPE file_table.
21 | DATA lv_subrc TYPE i.
22 | DATA: lo_excel TYPE REF TO zcl_excel,
23 | lo_reader TYPE REF TO zif_excel_reader,
24 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
25 | lo_salv TYPE REF TO cl_salv_table.
26 | DATA: lo_error TYPE REF TO cx_root.
27 |
28 | PARAMETERS p_file TYPE string LOWER CASE.
29 | PARAMETERS p_skip_b AS CHECKBOX.
30 |
31 | AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
32 | "
33 | "Ask User to choose a path
34 | "
35 | cl_gui_frontend_services=>file_open_dialog( EXPORTING window_title = 'Excel selection'
36 | file_filter = '*.xlsx'
37 | multiselection = abap_false
38 | CHANGING file_table = lt_filetable " Tabelle, die selektierte Dateien enthält
39 | rc = lv_subrc
40 | EXCEPTIONS file_open_dialog_failed = 1
41 | cntl_error = 2
42 | error_no_gui = 3
43 | not_supported_by_gui = 4
44 | OTHERS = 5 ).
45 | IF sy-subrc <> 0.
46 | MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
47 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
48 | ENDIF.
49 | DELETE lt_filetable FROM 2.
50 | READ TABLE lt_filetable INDEX 1 INTO ls_filetable.
51 | IF sy-subrc = 0.
52 | p_file = ls_filetable-filename.
53 | ENDIF.
54 |
55 | START-OF-SELECTION.
56 |
57 | TRY.
58 |
59 | CREATE OBJECT lo_reader TYPE zcl_excel_reader_2007.
60 | lo_excel = lo_reader->load_file( p_file ).
61 | lo_worksheet = lo_excel->get_worksheet_by_index( iv_index = 1 ).
62 | lo_worksheet->get_table(
63 | EXPORTING
64 | iv_skip_bottom_empty_rows = p_skip_b
65 | IMPORTING
66 | et_table = lt_tab ).
67 |
68 | "
69 | "Do the presentation stuff
70 | "
71 |
72 | cl_salv_table=>factory( IMPORTING r_salv_table = lo_salv
73 | CHANGING t_table = lt_tab ).
74 | lo_salv->display( ).
75 |
76 | CATCH cx_root INTO lo_error.
77 | MESSAGE lo_error TYPE 'I' DISPLAY LIKE 'E'.
78 | ENDTRY.
79 |
--------------------------------------------------------------------------------
/src/demo043/zdemo_excel43.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL43
7 | 1
8 | E
9 | X
10 | X
11 |
12 |
13 | -
14 | R
15 | abap2xlsx Demo: Demo 43 GET_TABLE
16 | 33
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/demo044/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo044/zdemo_excel44.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL44
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_excel44.
10 |
11 | DATA: lo_excel_no_line_if_empty TYPE REF TO zcl_excel,
12 | lo_excel TYPE REF TO zcl_excel,
13 | lo_worksheet_no_line_if_empty TYPE REF TO zcl_excel_worksheet,
14 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
15 |
16 | DATA: gc_save_file_name TYPE string VALUE '44_iTabEmpty.csv'.
17 | INCLUDE zdemo_excel_outputopt_incl.
18 |
19 | SELECTION-SCREEN BEGIN OF BLOCK b44 WITH FRAME TITLE txt_b44.
20 |
21 | * No line if internal table is empty
22 | DATA: p_mtyfil TYPE flag VALUE abap_true.
23 |
24 | SELECTION-SCREEN END OF BLOCK b44.
25 |
26 | INITIALIZATION.
27 | txt_b44 = 'Testing empty file option'(b44).
28 |
29 | START-OF-SELECTION.
30 |
31 | " Creates active sheet
32 | CREATE OBJECT lo_excel_no_line_if_empty.
33 | CREATE OBJECT lo_excel.
34 |
35 | " Get active sheet
36 | lo_worksheet_no_line_if_empty = lo_excel_no_line_if_empty->get_active_worksheet( ).
37 | lo_worksheet = lo_excel->get_active_worksheet( ).
38 | lo_worksheet_no_line_if_empty->set_title( 'Internal table' ).
39 | lo_worksheet->set_title( 'Internal table' ).
40 |
41 | DATA lt_test TYPE TABLE OF sflight.
42 |
43 | lo_worksheet_no_line_if_empty->bind_table( ip_table = lt_test
44 | iv_no_line_if_empty = p_mtyfil ).
45 |
46 | p_mtyfil = abap_false.
47 | lo_worksheet->bind_table( ip_table = lt_test
48 | iv_no_line_if_empty = p_mtyfil ).
49 |
50 | *** Create output
51 | lcl_output=>output( EXPORTING cl_excel = lo_excel_no_line_if_empty
52 | iv_writerclass_name = 'ZCL_EXCEL_WRITER_CSV' ).
53 |
54 | gc_save_file_name = '44_iTabNotEmpty.csv'.
55 | lcl_output=>output( EXPORTING cl_excel = lo_excel
56 | iv_writerclass_name = 'ZCL_EXCEL_WRITER_CSV' ).
57 |
--------------------------------------------------------------------------------
/src/demo044/zdemo_excel44.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL44
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Demo excel 44
17 | 29
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo045/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo045/zdemo_excel45.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL45
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 | REPORT zdemo_excel45.
9 |
10 | CONSTANTS:
11 | gc_ws_title_validation TYPE zexcel_sheet_title VALUE 'Validation'.
12 |
13 | DATA:
14 | lo_excel TYPE REF TO zcl_excel,
15 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
16 | lv_validation_string TYPE string,
17 | lo_data_validation TYPE REF TO zcl_excel_data_validation,
18 | lv_row TYPE zexcel_cell_row.
19 |
20 |
21 | CONSTANTS:
22 | gc_save_file_name TYPE string VALUE '45_ShowDropdown.xlsx'.
23 |
24 | INCLUDE zdemo_excel_outputopt_incl.
25 |
26 |
27 | START-OF-SELECTION.
28 |
29 | *** Sheet Admin
30 |
31 | * Creates active sheet
32 | CREATE OBJECT lo_excel.
33 |
34 | * Get active sheet
35 | lo_worksheet = lo_excel->get_active_worksheet( ).
36 |
37 | * Set sheet name "Validation"
38 | lo_worksheet->set_title( gc_ws_title_validation ).
39 |
40 |
41 | * short validations can be entered as string (<254Char)
42 | lv_validation_string = '"New York, Rio, Tokyo"'.
43 |
44 | * create validation object
45 | lo_data_validation = lo_worksheet->add_new_data_validation( ).
46 |
47 | * create new validation from validation string
48 | lo_data_validation->type = zcl_excel_data_validation=>c_type_list.
49 | lo_data_validation->formula1 = lv_validation_string.
50 | lo_data_validation->cell_row = 2.
51 | lo_data_validation->cell_row_to = 4.
52 | lo_data_validation->cell_column = 'A'.
53 | lo_data_validation->cell_column_to = 'A'.
54 | lo_data_validation->allowblank = 'X'.
55 | lo_data_validation->showdropdown = 'X'.
56 |
57 | * add some fields with validation
58 | lv_row = 2.
59 | WHILE lv_row <= 4.
60 | lo_worksheet->set_cell( ip_row = lv_row ip_column = 'A' ip_value = 'Select' ).
61 | lv_row = lv_row + 1.
62 | ENDWHILE.
63 |
64 | *** Create output
65 | lcl_output=>output( lo_excel ).
66 |
--------------------------------------------------------------------------------
/src/demo045/zdemo_excel45.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL45
7 | 1
8 | E
9 | X
10 | X
11 |
12 |
13 | -
14 | R
15 | abap2xlsx Demo: Show Dropdown
16 | 29
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/demo045/zdemo_excel45.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo045/zdemo_excel45.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo045/zdemo_excel45.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL45
6 | 45_ShowDropdown.xlsx (ZDEMO_EXCEL45)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 45_ShowDropdown.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo046/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo046/zdemo_excel46.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL46
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 | REPORT zdemo_excel46.
9 |
10 | CONSTANTS:
11 | gc_ws_title_validation TYPE zexcel_sheet_title VALUE 'Validation'.
12 |
13 | DATA:
14 | lo_excel TYPE REF TO zcl_excel,
15 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
16 | lv_validation_string TYPE string,
17 | lo_data_validation TYPE REF TO zcl_excel_data_validation,
18 | lv_row TYPE zexcel_cell_row.
19 |
20 |
21 | CONSTANTS:
22 | gc_save_file_name TYPE string VALUE '46_ValidationWarning.xlsx'.
23 |
24 | INCLUDE zdemo_excel_outputopt_incl.
25 |
26 |
27 | START-OF-SELECTION.
28 |
29 | *** Sheet Validation
30 |
31 | * Creates active sheet
32 | CREATE OBJECT lo_excel.
33 |
34 | * Get active sheet
35 | lo_worksheet = lo_excel->get_active_worksheet( ).
36 |
37 | * Set sheet name "Validation"
38 | lo_worksheet->set_title( gc_ws_title_validation ).
39 |
40 |
41 | * short validations can be entered as string (<254Char)
42 | lv_validation_string = '"New York, Rio, Tokyo"'.
43 |
44 | * create validation object
45 | lo_data_validation = lo_worksheet->add_new_data_validation( ).
46 |
47 | * create new validation from validation string
48 | lo_data_validation->type = zcl_excel_data_validation=>c_type_list.
49 | lo_data_validation->formula1 = lv_validation_string.
50 | lo_data_validation->cell_row = 2.
51 | lo_data_validation->cell_row_to = 4.
52 | lo_data_validation->cell_column = 'A'.
53 | lo_data_validation->cell_column_to = 'A'.
54 | lo_data_validation->allowblank = 'X'.
55 | lo_data_validation->showdropdown = 'X'.
56 | lo_data_validation->prompttitle = 'Value list available'.
57 | lo_data_validation->prompt = 'Please select a value from the value list'.
58 | lo_data_validation->errorstyle = zcl_excel_data_validation=>c_style_warning.
59 | lo_data_validation->errortitle = 'Warning'.
60 | lo_data_validation->error = 'This value does not exist in current value list.'.
61 |
62 | * add some fields with validation
63 | lv_row = 2.
64 | WHILE lv_row <= 4.
65 | lo_worksheet->set_cell( ip_row = lv_row ip_column = 'A' ip_value = 'Select' ).
66 | lv_row = lv_row + 1.
67 | ENDWHILE.
68 |
69 | *** Create output
70 | lcl_output=>output( lo_excel ).
71 |
--------------------------------------------------------------------------------
/src/demo046/zdemo_excel46.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL46
7 | 1
8 | E
9 | X
10 | X
11 |
12 |
13 | -
14 | R
15 | abap2xlsx Demo: Validation Style Warning
16 | 40
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/demo046/zdemo_excel46.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo046/zdemo_excel46.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo046/zdemo_excel46.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL46
6 | 46_ValidationWarning.xlsx (ZDEMO_EXCEL46)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 46_ValidationWarning.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo047/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo047/zdemo_excel47.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL47
7 | S
8 | D$
9 | 1
10 | E
11 | X
12 | D$S
13 | X
14 |
15 |
16 | -
17 | R
18 | abap2xlsx Demo: Table Calculated Columns (from Excel 365 or 2021)
19 | 65
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/demo047/zdemo_excel47.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo047/zdemo_excel47.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo047/zdemo_excel47.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL47
6 | 47_ColumnFormulas.xlsx (ZDEMO_EXCEL47)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 47_ColumnFormulas.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo048/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo048/zdemo_excel48.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL48
7 | S
8 | D$
9 | 1
10 | X
11 | D$S
12 | X
13 |
14 |
15 | -
16 | R
17 | abap2xlsx Demo: multiple styles in one cell
18 | 43
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo048/zdemo_excel48.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo048/zdemo_excel48.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo048/zdemo_excel48.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL48
6 | 48_MultipleStylesInOneCell.xlsx (ZDEMO_EXCEL48)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 48_MultipleStylesInOneCell.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo049/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo049/zdemo_excel49.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report zdemo_excel49
3 | *&---------------------------------------------------------------------*
4 | *&
5 | *&---------------------------------------------------------------------*
6 | REPORT zdemo_excel49.
7 | DATA: lo_excel TYPE REF TO zcl_excel,
8 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
9 | ls_table_settings TYPE zexcel_s_table_settings,
10 | ls_t002t TYPE t002t,
11 | lt_t002t TYPE TABLE OF t002t.
12 | CONSTANTS: gc_save_file_name TYPE string VALUE '49_Bind_Table_Conversion_Exit.xlsx'.
13 | INCLUDE zdemo_excel_outputopt_incl.
14 |
15 | START-OF-SELECTION.
16 | ls_t002t-spras = 'D'.
17 | ls_t002t-sprsl = 'D'.
18 | ls_t002t-sptxt = 'Deutsch'.
19 | APPEND ls_t002t TO lt_t002t.
20 | ls_t002t-spras = 'D'.
21 | ls_t002t-sprsl = 'E'.
22 | ls_t002t-sptxt = 'Englisch'.
23 | APPEND ls_t002t TO lt_t002t.
24 | ls_t002t-spras = 'E'.
25 | ls_t002t-sprsl = 'D'.
26 | ls_t002t-sptxt = 'German'.
27 | APPEND ls_t002t TO lt_t002t.
28 | ls_t002t-spras = 'E'.
29 | ls_t002t-sprsl = 'E'.
30 | ls_t002t-sptxt = 'English'.
31 | APPEND ls_t002t TO lt_t002t.
32 |
33 | CREATE OBJECT lo_excel.
34 | lo_worksheet = lo_excel->get_active_worksheet( ).
35 | ls_table_settings-top_left_column = 'A'.
36 | ls_table_settings-top_left_row = 1.
37 | lo_worksheet->bind_table(
38 | ip_table = lt_t002t
39 | is_table_settings = ls_table_settings
40 | ip_conv_exit_length = abap_true ).
41 | lcl_output=>output( lo_excel ).
42 |
--------------------------------------------------------------------------------
/src/demo049/zdemo_excel49.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL49
7 | S
8 | 1
9 | X
10 | D$S
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Bind Table with field having Conversion Exit
17 | 60
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo049/zdemo_excel49.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/demo049/zdemo_excel49.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/demo049/zdemo_excel49.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL49
6 | 49_Bind_Table_Conversion_Exit.xlsx (ZDEMO_EXCEL49)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | 49_Bind_Table_Conversion_Exit.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/demo050/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo050/zdemo_excel50.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL50
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Export internal table
17 | 38
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/demo051/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/demo051/zdemo_excel51.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL51
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Import internal table
17 | 40
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/npl0018 89d0c0ce8687b56786306d6dd.sicf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | /sap/bc/webdynpro/sap/NPL0018/
6 |
7 | NPL0018
8 | NPL0018
9 |
10 |
11 | NPL0018
12 | E
13 | Web Dynpro Application ZDEMO_EXCEL_WDA01 / Component ZDEMO_EXCEL_WDA01
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | abap2xlsx demonstration programs
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/zabap2xlsx_demo_show.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZABAP2XLSX_DEMO_SHOW
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | I
16 | 001
17 | There were errors. See internal T_ERRORS table.
18 | 94
19 |
20 | -
21 | R
22 | abap2xlsx Demo Show
23 | 19
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/zangry_birds.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZANGRY_BIRDS
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Styles
17 | 25
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_calendar.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_CALENDAR
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Create Calendar with Pictures
17 | 45
18 |
19 |
20 |
21 | -
22 | D
23 |
24 |
-
25 | I
26 | 000
27 | Ausrichtung
28 | 21
29 |
30 | -
31 | I
32 | 001
33 | KW
34 | 12
35 |
36 | -
37 | I
38 | 002
39 | Erzeugt mit https://github.com/abap2xlsx/abap2xlsx
40 | 132
41 |
42 | -
43 | R
44 | abap2xlsx Demo: Erzeugen eines Kalenders mit Bildern
45 | 70
46 |
47 | -
48 | S
49 | P_FROM
50 | Von
51 | 38
52 |
53 | -
54 | S
55 | P_LANDS
56 | Querformat
57 | 38
58 |
59 | -
60 | S
61 | P_PATH
62 | Pfad
63 | 38
64 |
65 | -
66 | S
67 | P_PORTR
68 | Hochformat
69 | 38
70 |
71 | -
72 | S
73 | P_TO
74 | Bis
75 | 38
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/src/zdemo_calendar_classes.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_CALENDAR_CLASSES
7 | I
8 | E
9 | X
10 |
11 |
12 | -
13 | R
14 | Include ZDEMO_CALENDAR_CLASSES
15 | 30
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/zdemo_excel.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo:
17 | 15
18 |
19 | -
20 | S
21 | P_PATH
22 | Select output path
23 | 26
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/zdemo_excel_checker.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL_CHECKER
7 | S
8 | 1
9 | X
10 | D$S
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx demos: check for regressions
17 | 38
18 |
19 | -
20 | S
21 | P_EXAXML
22 | Exact XML compar. (attr.order)
23 | 38
24 |
25 | -
26 | S
27 | P_PATH
28 | Folder path (write demo files)
29 | 38
30 |
31 | -
32 | S
33 | S_PROG
34 | Demo program
35 | 20
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/zdemo_excel_comments.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_EXCEL_COMMENTS
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 | REPORT zdemo_excel_comments.
9 |
10 | DATA: lo_excel TYPE REF TO zcl_excel,
11 | lo_worksheet TYPE REF TO zcl_excel_worksheet,
12 | lo_comment TYPE REF TO zcl_excel_comment,
13 | lv_comment TYPE string.
14 |
15 | CONSTANTS: gc_save_file_name TYPE string VALUE 'Comments.xlsx'.
16 | INCLUDE zdemo_excel_outputopt_incl.
17 |
18 |
19 | START-OF-SELECTION.
20 | " Creates active sheet
21 | CREATE OBJECT lo_excel.
22 |
23 | " Get active sheet
24 | lo_worksheet = lo_excel->get_active_worksheet( ).
25 |
26 | " Comments
27 | lo_comment = lo_excel->add_new_comment( ).
28 | lo_comment->set_text( ip_ref = 'B13' ip_text = 'This is how it begins to be debug time...' ).
29 | lo_worksheet->add_comment( lo_comment ).
30 | lo_comment = lo_excel->add_new_comment( ).
31 | " The top left position of the comment box will be at the BOTTOM RIGHT position of cell D19 (column 4, row 19)
32 | " and the bottom right position of the comment box will be at the BOTTOM RIGHT position of cell F22 (column 6, row 22).
33 | lo_comment->set_text( ip_ref = 'C18'
34 | ip_text = 'A comment at any position and any size'
35 | ip_left_column = 4
36 | ip_left_offset = 0
37 | ip_top_row = 19
38 | ip_top_offset = 0
39 | ip_right_column = 6
40 | ip_right_offset = 0
41 | ip_bottom_row = 22
42 | ip_bottom_offset = 0 ).
43 | lo_worksheet->add_comment( lo_comment ).
44 | lo_comment = lo_excel->add_new_comment( ).
45 | CONCATENATE 'A comment split' cl_abap_char_utilities=>cr_lf 'on 2 lines?' INTO lv_comment.
46 | lo_comment->set_text( ip_ref = 'F6' ip_text = lv_comment ).
47 | lo_worksheet->add_comment( lo_comment ).
48 |
49 | " Second sheet
50 | lo_worksheet = lo_excel->add_new_worksheet( ).
51 |
52 | lo_comment = lo_excel->add_new_comment( ).
53 | lo_comment->set_text( ip_ref = 'A8' ip_text = 'What about a comment on second sheet?' ).
54 | lo_worksheet->add_comment( lo_comment ).
55 |
56 | lo_excel->set_active_sheet_index_by_name( 'Sheet1' ).
57 |
58 | *** Create output
59 | lcl_output=>output( lo_excel ).
60 |
--------------------------------------------------------------------------------
/src/zdemo_excel_comments.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL_COMMENTS
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 28
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_excel_comments.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/zdemo_excel_comments.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/zdemo_excel_comments.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL_COMMENTS
6 | Comments.xlsx (ZDEMO_EXCEL_COMMENTS)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | Comments.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/zdemo_excel_fill_template.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL_FILL_TEMPLATE
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Fill template
17 | 29
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_excel_outputopt_incl.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL_OUTPUTOPT_INCL
7 | I
8 | E
9 | X
10 |
11 |
12 | -
13 | R
14 | Include ZDEMO_EXCEL_OUTPUTOPT_INCL
15 | 34
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/zdemo_excel_template.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/zdemo_excel_template.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/zdemo_excel_template.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZDEMO_EXCEL_TEMPLATE
6 | ZDEMO_EXCEL_TEMPLATE
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | ZABAP2XLSX_EXAMPLE.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/zdemo_excel_wda01.wdya.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_EXCEL_WDA01
7 | ZDEMO_EXCEL_WDA01
8 | W_MAIN
9 | DEFAULT
10 | ZDEMO_EXCEL_WDA01
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/zdemo_excel_wda01.wdyn.componentcontroller.abap:
--------------------------------------------------------------------------------
1 | method WDDOAPPLICATIONSTATECHANGE .
2 | endmethod.
3 |
4 | method WDDOBEFORENAVIGATION .
5 | endmethod.
6 |
7 | method WDDOEXIT .
8 | endmethod.
9 |
10 | method WDDOINIT .
11 | endmethod.
12 |
13 | method WDDOPOSTPROCESSING .
14 | endmethod.
15 |
16 |
--------------------------------------------------------------------------------
/src/zdemo_excel_wda01.wdyn.v_main.abap:
--------------------------------------------------------------------------------
1 | METHOD onactionbtn_download .
2 |
3 | DATA: lo_excel TYPE REF TO zcl_excel,
4 | lo_excel_writer TYPE REF TO zcl_excel_writer_2007,
5 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
6 | DATA: lv_content TYPE xstring.
7 |
8 | TRY.
9 | CREATE OBJECT lo_excel.
10 | lo_worksheet = lo_excel->get_active_worksheet( ).
11 |
12 | lo_worksheet->set_cell( ip_column = 'B'
13 | ip_row = '2'
14 | ip_value = 'Welcome to Web Dynpro and abap2xlsx.' ).
15 |
16 | CREATE OBJECT lo_excel_writer.
17 | lv_content = lo_excel_writer->zif_excel_writer~write_file( lo_excel ).
18 | CATCH zcx_excel.
19 | "Unlikely, ignore to keep demo simple.
20 | ENDTRY.
21 |
22 | DATA: lv_filename TYPE string.
23 | lv_filename = 'wda01.xlsx'.
24 |
25 | CALL METHOD cl_wd_runtime_services=>attach_file_to_response
26 | EXPORTING
27 | i_filename = lv_filename
28 | i_content = lv_content
29 | i_mime_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
30 | i_in_new_window = abap_false
31 | i_inplace = abap_false.
32 |
33 | ENDMETHOD.
34 |
35 | method WDDOAFTERACTION .
36 | endmethod.
37 |
38 | method WDDOBEFOREACTION .
39 | * data lo_api_controller type ref to if_wd_view_controller.
40 | * data lo_action type ref to if_wd_action.
41 |
42 | * lo_api_controller = wd_this->wd_get_api( ).
43 | * lo_action = lo_api_controller->get_current_action( ).
44 |
45 | * if lo_action is bound.
46 | * case lo_action->name.
47 | * when '...'.
48 |
49 | * endcase.
50 | * endif.
51 | endmethod.
52 |
53 | method WDDOEXIT .
54 | endmethod.
55 |
56 | method WDDOINIT .
57 | endmethod.
58 |
59 | method WDDOMODIFYVIEW .
60 | DATA lo_button TYPE REF TO cl_wd_button.
61 | lo_button ?= view->get_element( id = 'BTN_DOWNLOAD' ).
62 | lo_button->set_text( 'Download' ).
63 | endmethod.
64 |
65 | method WDDOONCONTEXTMENU .
66 | endmethod.
67 |
68 |
--------------------------------------------------------------------------------
/src/zdemo_excel_wda01.wdyn.w_main.abap:
--------------------------------------------------------------------------------
1 | method HANDLEDEFAULT .
2 | endmethod.
3 |
4 | method WDDOEXIT .
5 | endmethod.
6 |
7 | method WDDOINIT .
8 | endmethod.
9 |
10 | method WDDOONCLOSE .
11 | endmethod.
12 |
13 | method WDDOONOPEN .
14 | endmethod.
15 |
16 |
--------------------------------------------------------------------------------
/src/zdemo_teched1.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_TECHED1
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_teched1.
10 |
11 | *******************************
12 | * Data Object declaration *
13 | *******************************
14 |
15 | DATA: lo_excel TYPE REF TO zcl_excel,
16 | lo_excel_writer TYPE REF TO zif_excel_writer,
17 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
18 |
19 | DATA: lv_file TYPE xstring,
20 | lv_bytecount TYPE i,
21 | lt_file_tab TYPE solix_tab.
22 |
23 | DATA: lv_full_path TYPE string,
24 | lv_workdir TYPE string,
25 | lv_file_separator TYPE c.
26 |
27 | CONSTANTS: lv_default_file_name TYPE string VALUE 'TechEd01.xlsx'.
28 |
29 | *******************************
30 | * Selection screen management *
31 | *******************************
32 |
33 | PARAMETERS: p_path TYPE zexcel_export_dir.
34 |
35 | AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
36 | lv_workdir = p_path.
37 | cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
38 | CHANGING selected_folder = lv_workdir ).
39 | p_path = lv_workdir.
40 |
41 | INITIALIZATION.
42 | cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
43 | cl_gui_cfw=>flush( ).
44 | p_path = lv_workdir.
45 |
46 | START-OF-SELECTION.
47 |
48 | IF p_path IS INITIAL.
49 | p_path = lv_workdir.
50 | ENDIF.
51 | cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
52 | CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
53 |
54 |
55 | *******************************
56 | * abap2xlsx create XLSX *
57 | *******************************
58 |
59 | " Create excel instance
60 | CREATE OBJECT lo_excel.
61 |
62 | " Get active sheet
63 | lo_worksheet = lo_excel->get_active_worksheet( ).
64 | lo_worksheet->set_title( ip_title = 'Demo01' ).
65 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
66 |
67 | " Create xlsx stream
68 | CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
69 | lv_file = lo_excel_writer->write_file( lo_excel ).
70 |
71 | *******************************
72 | * Output *
73 | *******************************
74 |
75 | " Convert to binary
76 | lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ).
77 | lv_bytecount = xstrlen( lv_file ).
78 |
79 | " Save the file
80 | cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
81 | filename = lv_full_path
82 | filetype = 'BIN'
83 | CHANGING data_tab = lt_file_tab ).
84 |
--------------------------------------------------------------------------------
/src/zdemo_teched1.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED1
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched10.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_TECHED3
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_teched10.
10 |
11 | *******************************
12 | * Data Object declaration *
13 | *******************************
14 |
15 | DATA: lo_excel TYPE REF TO zcl_excel,
16 | lo_excel_reader TYPE REF TO zif_excel_reader,
17 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
18 |
19 | DATA: lv_full_path TYPE string.
20 |
21 | DATA lv_value TYPE zexcel_cell_value.
22 |
23 | CONSTANTS: gc_save_file_name TYPE string VALUE 'TechEd01.xlsx'.
24 | INCLUDE zdemo_excel_outputopt_incl.
25 |
26 | START-OF-SELECTION.
27 |
28 | *******************************
29 | * abap2xlsx read XLSX *
30 | *******************************
31 | CREATE OBJECT lo_excel_reader TYPE zcl_excel_reader_2007.
32 | lo_excel = lo_excel_reader->load_file( lv_full_path ).
33 |
34 | lo_excel->set_active_sheet_index( 1 ).
35 | lo_worksheet = lo_excel->get_active_worksheet( ).
36 |
37 | lo_worksheet->get_cell( EXPORTING ip_column = 'C'
38 | ip_row = 10
39 | IMPORTING ep_value = lv_value ).
40 |
41 | WRITE: 'abap2xlsx total score is ', lv_value.
42 |
43 | *** Create output
44 | lcl_output=>output( lo_excel ).
45 |
--------------------------------------------------------------------------------
/src/zdemo_teched10.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED10
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched2.prog.abap:
--------------------------------------------------------------------------------
1 | *&---------------------------------------------------------------------*
2 | *& Report ZDEMO_TECHED2
3 | *&
4 | *&---------------------------------------------------------------------*
5 | *&
6 | *&
7 | *&---------------------------------------------------------------------*
8 |
9 | REPORT zdemo_teched2.
10 |
11 | *******************************
12 | * Data Object declaration *
13 | *******************************
14 |
15 | DATA: lo_excel TYPE REF TO zcl_excel,
16 | lo_excel_writer TYPE REF TO zif_excel_writer,
17 | lo_worksheet TYPE REF TO zcl_excel_worksheet.
18 |
19 | DATA: lo_style_title TYPE REF TO zcl_excel_style,
20 | lv_style_title_guid TYPE zexcel_cell_style.
21 |
22 | DATA: lv_file TYPE xstring,
23 | lv_bytecount TYPE i,
24 | lt_file_tab TYPE solix_tab.
25 |
26 | DATA: lv_full_path TYPE string,
27 | lv_workdir TYPE string,
28 | lv_file_separator TYPE c.
29 |
30 | CONSTANTS: lv_default_file_name TYPE string VALUE 'TechEd01.xlsx'.
31 |
32 | *******************************
33 | * Selection screen management *
34 | *******************************
35 |
36 | PARAMETERS: p_path TYPE zexcel_export_dir.
37 |
38 | AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
39 | lv_workdir = p_path.
40 | cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder = lv_workdir
41 | CHANGING selected_folder = lv_workdir ).
42 | p_path = lv_workdir.
43 |
44 | INITIALIZATION.
45 | cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
46 | cl_gui_cfw=>flush( ).
47 | p_path = lv_workdir.
48 |
49 | START-OF-SELECTION.
50 |
51 | IF p_path IS INITIAL.
52 | p_path = lv_workdir.
53 | ENDIF.
54 | cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
55 | CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
56 |
57 | *******************************
58 | * abap2xlsx create XLSX *
59 | *******************************
60 |
61 | " Create excel instance
62 | CREATE OBJECT lo_excel.
63 |
64 | " Styles
65 | lo_style_title = lo_excel->add_new_style( ).
66 | lo_style_title->font->bold = abap_true.
67 | lo_style_title->font->color-rgb = zcl_excel_style_color=>c_blue.
68 | lv_style_title_guid = lo_style_title->get_guid( ).
69 |
70 | " Get active sheet
71 | lo_worksheet = lo_excel->get_active_worksheet( ).
72 | lo_worksheet->set_title( ip_title = 'Demo TechEd' ).
73 | lo_worksheet->set_cell( ip_column = 'B' ip_row = 5 ip_value = 'TechEd demo' ip_style = lv_style_title_guid ).
74 |
75 | " Create xlsx stream
76 | CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
77 | lv_file = lo_excel_writer->write_file( lo_excel ).
78 |
79 | *******************************
80 | * Output *
81 | *******************************
82 |
83 | " Convert to binary
84 | lt_file_tab = cl_bcs_convert=>xstring_to_solix( iv_xstring = lv_file ).
85 | lv_bytecount = xstrlen( lv_file ).
86 |
87 | " Save the file
88 | cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
89 | filename = lv_full_path
90 | filetype = 'BIN'
91 | CHANGING data_tab = lt_file_tab ).
92 |
--------------------------------------------------------------------------------
/src/zdemo_teched2.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED2
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched3.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED3
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched4.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED4
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched5.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED5
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched6.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED6
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched7.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED7
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched8.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED8
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zdemo_teched9.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZDEMO_TECHED9
7 | 1
8 | T
9 | E
10 | X
11 | X
12 |
13 |
14 | -
15 | R
16 | abap2xlsx Demo: Hello World
17 | 27
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/zexcel_export_dir.dtel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZEXCEL_EXPORT_DIR
7 | E
8 | TEXT255
9 | 20
10 | 10
11 | 15
12 | 20
13 | Export Directory
14 | Export Directory
15 | Exprt D
16 | Exprt D
17 | Export Directory
18 | E
19 | D
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/zexcel_tr_docprops_core.xslt.source.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/zexcel_tr_docprops_core.xslt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZEXCEL_TR_DOCPROPS_CORE
7 | E
8 | docProps/core.xml
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/zif_excel_demo_output.intf.abap:
--------------------------------------------------------------------------------
1 | INTERFACE zif_excel_demo_output PUBLIC.
2 | CLASS-METHODS run
3 | RETURNING
4 | VALUE(ro_excel) TYPE REF TO zcl_excel
5 | RAISING
6 | zcx_excel.
7 | ENDINTERFACE.
8 |
--------------------------------------------------------------------------------
/src/zif_excel_demo_output.intf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZIF_EXCEL_DEMO_OUTPUT
7 | E
8 | ZIF_EXCEL_DEMO_OUTPUT
9 | 2
10 | 1
11 | X
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/ztest_excel_image_header.prog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZTEST_EXCEL_IMAGE_HEADER
7 | 1
8 | D
9 | X
10 | X
11 |
12 |
13 | -
14 | D
15 |
16 |
-
17 | R
18 | Image Excel header
19 | 18
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/ztest_excel_image_header.w3mi.data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abap2xlsx/demos/433f946f609bce2d9c622f876799ad244b55b68f/src/ztest_excel_image_header.w3mi.data.xlsx
--------------------------------------------------------------------------------
/src/ztest_excel_image_header.w3mi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZTEST_EXCEL_IMAGE_HEADER
6 | Image_Header_Footer.xlsx (ZTEST_EXCEL_IMAGE_HEADER)
7 |
8 |
9 | fileextension
10 | .xlsx
11 |
12 |
13 | filename
14 | Image_Header_Footer.xlsx
15 |
16 |
17 | mimetype
18 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------