Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandraros/check demo regressions 2 #940

Merged
merged 9 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/demos/zdemo_excel.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DATA: lv_workdir TYPE string,


PARAMETERS: p_path TYPE zexcel_export_dir.
PARAMETERS: p_checkr NO-DISPLAY TYPE abap_bool.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
lv_workdir = p_path.
Expand All @@ -37,7 +38,7 @@ START-OF-SELECTION.

SUBMIT zdemo_excel1 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Hello world
SUBMIT zdemo_excel2 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Styles
SUBMIT zdemo_excel3 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: iTab binding
SUBMIT zdemo_excel3 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path WITH p_checkr = p_checkr AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: iTab binding
SUBMIT zdemo_excel4 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Multi sheets, page setup and sheet properties
SUBMIT zdemo_excel5 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Conditional formatting
SUBMIT zdemo_excel6 WITH rb_down = abap_true WITH rb_show = abap_false WITH p_path = p_path AND RETURN. "#EC CI_SUBMIT abap2xlsx Demo: Formulas
Expand Down
10 changes: 7 additions & 3 deletions src/demos/zdemo_excel1.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ REPORT zdemo_excel1.
DATA: lo_excel TYPE REF TO zcl_excel,
lo_worksheet TYPE REF TO zcl_excel_worksheet,
lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
lo_column TYPE REF TO zcl_excel_column.
lo_column TYPE REF TO zcl_excel_column,
lv_date TYPE d,
lv_time TYPE t.

CONSTANTS: gc_save_file_name TYPE string VALUE '01_HelloWorld.xlsx'.
INCLUDE zdemo_excel_outputopt_incl.
Expand All @@ -25,8 +27,10 @@ START-OF-SELECTION.
" Get active sheet
lo_worksheet = lo_excel->get_active_worksheet( ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = sy-datum ).
lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = sy-uzeit ).
lv_date = '20211231'.
lv_time = '055817'.
lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = lv_date ).
lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = lv_time ).
lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://abap2xlsx.github.io/abap2xlsx' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 4 ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ).

Expand Down
Binary file added src/demos/zdemo_excel1.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel1.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL1</NAME>
<TEXT>01_HelloWorld.xlsx (ZDEMO_EXCEL1)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL1</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL1</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL1</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
53 changes: 51 additions & 2 deletions src/demos/zdemo_excel10.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

REPORT zdemo_excel10.

TYPES: ty_sflight_lines TYPE TABLE OF sflight.

DATA: lo_excel TYPE REF TO zcl_excel,
lo_worksheet TYPE REF TO zcl_excel_worksheet,
lo_style_cond TYPE REF TO zcl_excel_style_cond,
Expand Down Expand Up @@ -51,8 +53,8 @@ START-OF-SELECTION.
lo_style_cond->mode_iconset = ls_iconset.
lo_style_cond->priority = 1.

DATA lt_test TYPE TABLE OF sflight.
SELECT * FROM sflight INTO TABLE lt_test. "#EC CI_NOWHERE
DATA lt_test TYPE ty_sflight_lines.
PERFORM load_fixed_data CHANGING lt_test.

lt_field_catalog = zcl_excel_common=>get_fieldcatalog( ip_table = lt_test ).

Expand Down Expand Up @@ -93,3 +95,50 @@ START-OF-SELECTION.

*** Create output
lcl_output=>output( lo_excel ).


FORM load_fixed_data CHANGING ct_test TYPE ty_sflight_lines.
DATA: lt_lines TYPE TABLE OF string,
lv_line TYPE string,
lt_fields TYPE TABLE OF string,
lv_comp TYPE i,
lv_field TYPE string,
ls_test TYPE sflight.
FIELD-SYMBOLS: <lv_field> TYPE simple.

APPEND 'AA 0017 20171219 422 USD 747-400 385 371 191334 31 28 21 21' TO lt_lines.
APPEND 'AA 0017 20180309 422 USD 747-400 385 365 189984 31 29 21 20' TO lt_lines.
APPEND 'AA 0017 20180528 422 USD 747-400 385 374 193482 31 30 21 20' TO lt_lines.
APPEND 'AA 0017 20180816 422 USD 747-400 385 372 193127 31 30 21 20' TO lt_lines.
APPEND 'AA 0017 20181104 422 USD 747-400 385 44 23908 31 4 21 3' TO lt_lines.
APPEND 'AA 0017 20190123 422 USD 747-400 385 40 20347 31 3 21 2' TO lt_lines.
APPEND 'AZ 0555 20171219 185 EUR 737-800 140 133 32143 12 12 10 10' TO lt_lines.
APPEND 'AZ 0555 20180309 185 EUR 737-800 140 137 32595 12 12 10 10' TO lt_lines.
APPEND 'AZ 0555 20180528 185 EUR 737-800 140 134 31899 12 11 10 10' TO lt_lines.
APPEND 'AZ 0555 20180816 185 EUR 737-800 140 128 29775 12 10 10 9' TO lt_lines.
APPEND 'AZ 0555 20181104 185 EUR 737-800 140 0 0 12 0 10 0' TO lt_lines.
APPEND 'AZ 0555 20190123 185 EUR 737-800 140 23 5392 12 1 10 2' TO lt_lines.
APPEND 'AZ 0789 20171219 1030 EUR 767-200 260 250 307176 21 20 11 11' TO lt_lines.
APPEND 'AZ 0789 20180309 1030 EUR 767-200 260 252 306054 21 20 11 10' TO lt_lines.
APPEND 'AZ 0789 20180528 1030 EUR 767-200 260 252 307063 21 20 11 10' TO lt_lines.
APPEND 'AZ 0789 20180816 1030 EUR 767-200 260 249 300739 21 19 11 10' TO lt_lines.
APPEND 'AZ 0789 20181104 1030 EUR 767-200 260 104 127647 21 8 11 5' TO lt_lines.
APPEND 'AZ 0789 20190123 1030 EUR 767-200 260 18 22268 21 1 11 1' TO lt_lines.
APPEND 'DL 0106 20171217 611 USD A380-800 475 458 324379 30 29 20 20' TO lt_lines.
APPEND 'DL 0106 20180307 611 USD A380-800 475 458 324330 30 30 20 20' TO lt_lines.
APPEND 'DL 0106 20180526 611 USD A380-800 475 459 328149 30 29 20 20' TO lt_lines.
APPEND 'DL 0106 20180814 611 USD A380-800 475 462 326805 30 30 20 18' TO lt_lines.
APPEND 'DL 0106 20181102 611 USD A380-800 475 167 115554 30 10 20 6' TO lt_lines.
APPEND 'DL 0106 20190121 611 USD A380-800 475 11 9073 30 1 20 1' TO lt_lines.
LOOP AT lt_lines INTO lv_line.
CONDENSE lv_line.
SPLIT lv_line AT space INTO TABLE lt_fields.
lv_comp = 2.
LOOP AT lt_fields INTO lv_field.
ASSIGN COMPONENT lv_comp OF STRUCTURE ls_test TO <lv_field>.
<lv_field> = lv_field.
lv_comp = lv_comp + 1.
ENDLOOP.
APPEND ls_test TO ct_test.
ENDLOOP.
ENDFORM.
Binary file added src/demos/zdemo_excel10.w3mi.data.xlsx
Binary file not shown.
29 changes: 29 additions & 0 deletions src/demos/zdemo_excel10.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL10</NAME>
<TEXT>10_iTabFieldCatalog.xlsx (ZDEMO_EXCEL10)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL10</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL10</OBJID>
<NAME>filename</NAME>
<VALUE>10_iTabFieldCatalog.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL10</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel12.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel12.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL12</NAME>
<TEXT>12_HideSizeOutlineRowsAndColumns.xlsx (ZDEMO_EXCEL12)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL12</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL12</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL12</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel13.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel13.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL13</NAME>
<TEXT>13_MergedCells.xlsx (ZDEMO_EXCEL13)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL13</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL13</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL13</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel14.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel14.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL14</NAME>
<TEXT>14_Alignment.xlsx (ZDEMO_EXCEL14)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL14</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL14</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL14</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel15_01.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel15_01.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL15_01</NAME>
<TEXT>15_01_HelloWorldFromReader.xlsx (ZDEMO_EXCEL15)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_01</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_01</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_01</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel15_02.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel15_02.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL15_02</NAME>
<TEXT>15_02_StylesFromReader.xlsx (ZDEMO_EXCEL15)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_02</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_02</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_02</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel15_03.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel15_03.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL15_03</NAME>
<TEXT>15_03_iTabFromReader.xlsx (ZDEMO_EXCEL15)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_03</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_03</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_03</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel15_04.w3mi.data.xlsx
Binary file not shown.
28 changes: 28 additions & 0 deletions src/demos/zdemo_excel15_04.w3mi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_W3MI" serializer_version="v2.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<NAME>ZDEMO_EXCEL15_04</NAME>
<TEXT>15_04_SheetsFromReader.xlsx (ZDEMO_EXCEL15)</TEXT>
<PARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_04</OBJID>
<NAME>fileextension</NAME>
<VALUE>.xlsx</VALUE>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_04</OBJID>
<NAME>filename</NAME>
</WWWPARAMS>
<WWWPARAMS>
<RELID>MI</RELID>
<OBJID>ZDEMO_EXCEL15_04</OBJID>
<NAME>mimetype</NAME>
<VALUE>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</VALUE>
</WWWPARAMS>
</PARAMS>
</asx:values>
</asx:abap>
</abapGit>
Binary file added src/demos/zdemo_excel15_05.w3mi.data.xlsx
Binary file not shown.
Loading