From 25268956005d58b59e14e5909a659a6439b6d48a Mon Sep 17 00:00:00 2001 From: Bernd <135710507+darnoc312@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:40:27 +0100 Subject: [PATCH] Update zcl_excel_writer_2007.clas.abap --- src/zcl_excel_writer_2007.clas.abap | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/zcl_excel_writer_2007.clas.abap b/src/zcl_excel_writer_2007.clas.abap index 9f09b89..736dfd6 100644 --- a/src/zcl_excel_writer_2007.clas.abap +++ b/src/zcl_excel_writer_2007.clas.abap @@ -1215,9 +1215,8 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. CHECK iv_cell_style IS NOT INITIAL. READ TABLE me->styles_mapping INTO ls_styles_mapping WITH KEY guid = iv_cell_style. - ADD 1 TO ls_styles_mapping-style. " the numbering starts from 0 - READ TABLE it_cellxfs INTO ls_cellxfs INDEX ls_styles_mapping-style. - ADD 1 TO ls_cellxfs-fillid. " the numbering starts from 0 + lv_index = ls_styles_mapping-style + 1. " the numbering starts from 0 + READ TABLE it_cellxfs INTO ls_cellxfs INDEX lv_index. READ TABLE me->styles_cond_mapping INTO ls_style_cond_mapping WITH KEY style = ls_styles_mapping-style. IF sy-subrc EQ 0. @@ -1235,7 +1234,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. parent = io_ixml_document ). "Conditional formatting font style correction by Alessandro Iannacci START - lv_index = ls_cellxfs-fontid + 1. + lv_index = ls_cellxfs-fontid + 1. " the numbering starts from 0 READ TABLE it_fonts INTO ls_font INDEX lv_index. IF ls_font IS NOT INITIAL. lo_element_font = io_ixml_document->create_simple_element( name = lc_xml_node_font @@ -1273,7 +1272,8 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. "---Conditional formatting font style correction by Alessandro Iannacci END - READ TABLE it_fills INTO ls_fill INDEX ls_cellxfs-fillid. + lv_index = ls_cellxfs-fillid + 1. " the numbering starts from 0 + READ TABLE it_fills INTO ls_fill INDEX lv_index. IF ls_fill IS NOT INITIAL. " fill properties lo_element_fill = io_ixml_document->create_simple_element( name = lc_xml_node_fill @@ -1309,10 +1309,11 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lo_sub_element->append_child( new_child = lo_element_fill ). ENDIF. + + io_dxf_element->append_child( new_child = lo_sub_element ). ENDIF. - io_dxf_element->append_child( new_child = lo_sub_element ). - ENDMETHOD. +ENDMETHOD. METHOD create_relationships.