From 000b7cf79783314c946d89eb909278c1551b2fcd Mon Sep 17 00:00:00 2001 From: Domi Bigl Date: Sat, 2 Jul 2022 10:39:46 +0200 Subject: [PATCH 1/4] fixe column freeze error (#1042) use lv_freeze_cell_column to column freeze instead of lv_freeze_cell_row --- src/zcl_excel_writer_huge_file.clas.abap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zcl_excel_writer_huge_file.clas.abap b/src/zcl_excel_writer_huge_file.clas.abap index 8395fa7..c63c76a 100644 --- a/src/zcl_excel_writer_huge_file.clas.abap +++ b/src/zcl_excel_writer_huge_file.clas.abap @@ -415,7 +415,7 @@ CLASS zcl_excel_writer_huge_file IMPLEMENTATION. IF lv_freeze_cell_column > 1. lv_value = lv_freeze_cell_column - 1. - l_worksheet-xsplit = lv_freeze_cell_row - 1. + l_worksheet-xsplit = lv_freeze_cell_column - 1. ENDIF. lv_freeze_cell_column_alpha = zcl_excel_common=>convert_column2alpha( ip_column = lv_freeze_cell_column ). From 11b47ec222f54792abb077cd5a56fb0a782edd79 Mon Sep 17 00:00:00 2001 From: sandraros <34005250+sandraros@users.noreply.github.com> Date: Wed, 13 Jul 2022 20:28:07 +0200 Subject: [PATCH 2/4] endless loop in bind_table (#1044) Fix #1043 * endless loop in bind_table * Handle more than 100 identical texts * correct typos in comments Co-authored-by: sandraros Co-authored-by: Abo --- src/zcl_excel_worksheet.clas.abap | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/zcl_excel_worksheet.clas.abap b/src/zcl_excel_worksheet.clas.abap index a94d403..db1837e 100644 --- a/src/zcl_excel_worksheet.clas.abap +++ b/src/zcl_excel_worksheet.clas.abap @@ -2964,14 +2964,18 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog, lv_value_lowercase TYPE string, + lv_scrtext_l_initial TYPE scrtext_l, + lv_long_text TYPE string, + lv_max_length TYPE i, + lv_temp_length TYPE i, lv_syindex TYPE c LENGTH 3, lt_column_name_buffer TYPE SORTED TABLE OF string WITH UNIQUE KEY table_line. FIELD-SYMBOLS: TYPE zexcel_s_fieldcatalog, - TYPE any, - TYPE any, - TYPE any. + TYPE any, + TYPE any, + TYPE any. - " Due restrinction of new table object we cannot have two column with the same name + " Due to restrictions in new table object we cannot have two columns with the same name " Check if a column with the same name exists, if exists add a counter " If no medium description is provided we try to use small or long @@ -3008,6 +3012,8 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. -scrtext_l = 'Column'. " default value as Excel does ENDIF. + lv_scrtext_l_initial = -scrtext_l. + DESCRIBE FIELD -scrtext_l LENGTH lv_max_length IN CHARACTER MODE. DO. lv_value_lowercase = -scrtext_l. TRANSLATE lv_value_lowercase TO LOWER CASE. @@ -3017,7 +3023,14 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. EXIT. ELSE. lv_syindex = sy-index. - CONCATENATE -scrtext_l lv_syindex INTO -scrtext_l. + CONCATENATE lv_scrtext_l_initial lv_syindex INTO lv_long_text. + IF strlen( lv_long_text ) <= lv_max_length. + -scrtext_l = lv_long_text. + ELSE. + lv_temp_length = strlen( lv_scrtext_l_initial ) - 1. + lv_scrtext_l_initial = substring( val = lv_scrtext_l_initial len = lv_temp_length ). + CONCATENATE lv_scrtext_l_initial lv_syindex INTO -scrtext_l. + ENDIF. ENDIF. ENDDO. From 4ab5bbe961ab4f49ca9d777d3b57c418173335f6 Mon Sep 17 00:00:00 2001 From: sandraros <34005250+sandraros@users.noreply.github.com> Date: Fri, 15 Jul 2022 09:33:39 +0200 Subject: [PATCH 3/4] ZABAPGIT_STANDALONE instea of ZABAPGIT_FULL (#1047) [abapGit instructions](https://docs.abapgit.org/guide-install.html) say `create a new report named ZABAPGIT_STANDALONE (formerly ZABAPGIT_FULL)` --- docs/abapGit-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/abapGit-installation.md b/docs/abapGit-installation.md index 14b3a48..0f08dd1 100644 --- a/docs/abapGit-installation.md +++ b/docs/abapGit-installation.md @@ -4,7 +4,7 @@ ## Procedure -Execute abapGit using the report **ZABAPGIT_FULL**, click on *New Online*, fill the field *Git repository URL* with *https://github.com/abap2xlsx/abap2xlsx.git*, package with *$abap2xlsx* if you just want to test. If you want to transport abap2xlsx to production then use a non local package, for example ZABAP2XLSX. Click *Create package* if the package doesn't exist yet. Then click *Clone online repo*. +Execute abapGit using the report **ZABAPGIT_STANDALONE**, click on *New Online*, fill the field *Git repository URL* with *https://github.com/abap2xlsx/abap2xlsx.git*, package with *$abap2xlsx* if you just want to test. If you want to transport abap2xlsx to production then use a non local package, for example ZABAP2XLSX. Click *Create package* if the package doesn't exist yet. Then click *Clone online repo*. ![abapGit New Online Repository](new-online-abap2xlsx.png) From c6e5ad6ee63429c4ee16ba796738c7ee46c9a3d0 Mon Sep 17 00:00:00 2001 From: Abo Date: Sat, 16 Jul 2022 19:38:46 +0200 Subject: [PATCH 4/4] adopt default style when setting format for date / time (#1025) * first draft must check cloning vs uuid assignment, it works but I'm not convinced this is correct * remove unused class attribute * fixed unrelated typo * fixed linter complaints and revised changes * Delete zexcel_t_sheet_style.ttyp.xml * Delete zexcel_s_sheet_style.tabl.xml Co-authored-by: Gregor Wolf --- src/zcl_excel_worksheet.clas.abap | 6 ++++-- src/zcl_excel_worksheet.clas.xml | 12 ------------ src/zexcel_s_sheet_style.tabl.xml | 22 ---------------------- src/zexcel_t_sheet_style.ttyp.xml | 18 ------------------ 4 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 src/zexcel_s_sheet_style.tabl.xml delete mode 100644 src/zexcel_t_sheet_style.ttyp.xml diff --git a/src/zcl_excel_worksheet.clas.abap b/src/zcl_excel_worksheet.clas.abap index db1837e..4a871a4 100644 --- a/src/zcl_excel_worksheet.clas.abap +++ b/src/zcl_excel_worksheet.clas.abap @@ -92,7 +92,6 @@ CLASS zcl_excel_worksheet DEFINITION DATA sheet_setup TYPE REF TO zcl_excel_sheet_setup . DATA show_gridlines TYPE zexcel_show_gridlines READ-ONLY VALUE abap_true ##NO_TEXT. DATA show_rowcolheaders TYPE zexcel_show_gridlines READ-ONLY VALUE abap_true ##NO_TEXT. - DATA styles TYPE zexcel_t_sheet_style . DATA tabcolor TYPE zexcel_s_tabcolor READ-ONLY . DATA column_formulas TYPE mty_th_column_formula READ-ONLY . CLASS-DATA: @@ -3144,7 +3143,7 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. rv_guid = ip_style_or_guid. ELSE. - RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'IP_GUID type must be either REF TO zcl_excel_tyle or zexcel_cell_style'. + RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'IP_GUID type must be either REF TO zcl_excel_style or zexcel_cell_style'. ENDIF. ENDMETHOD. @@ -3698,6 +3697,9 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. * If not, use default DATA: lo_format_code_datetime TYPE zexcel_number_format. DATA: stylemapping TYPE zexcel_s_stylemapping. + IF -cell_style IS INITIAL. + -cell_style = me->excel->get_default_style( ). + ENDIF. CASE lv_value_type. WHEN cl_abap_typedescr=>typekind_date. TRY. diff --git a/src/zcl_excel_worksheet.clas.xml b/src/zcl_excel_worksheet.clas.xml index f53acab..7b905e8 100644 --- a/src/zcl_excel_worksheet.clas.xml +++ b/src/zcl_excel_worksheet.clas.xml @@ -1101,18 +1101,6 @@ I Show Gridlines - - ZCL_EXCEL_WORKSHEET - STYLES - E - Sheet style table type - - - ZCL_EXCEL_WORKSHEET - STYLES - I - Sheet style table type - ZCL_EXCEL_WORKSHEET STYLES_COND diff --git a/src/zexcel_s_sheet_style.tabl.xml b/src/zexcel_s_sheet_style.tabl.xml deleted file mode 100644 index 9d2dd49..0000000 --- a/src/zexcel_s_sheet_style.tabl.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - ZEXCEL_S_SHEET_STYLE - E - INTTAB - Sheet style structure - 1 - - - - GUID - ZEXCEL_CELL_STYLE - 0 - E - - - - - diff --git a/src/zexcel_t_sheet_style.ttyp.xml b/src/zexcel_t_sheet_style.ttyp.xml deleted file mode 100644 index 68734a7..0000000 --- a/src/zexcel_t_sheet_style.ttyp.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - ZEXCEL_T_SHEET_STYLE - E - ZEXCEL_S_SHEET_STYLE - S - STRU - T - D - N - Sheet style table type - - - -