diff --git a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk index caa620f..2236c17 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk @@ -1,6 +1,6 @@ - + *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes @@ -35,7 +35,7 @@ me->excel = io_excel. ep_file = me->create( ). -endmethod. + endmethod. @@ -232,7 +232,7 @@ endmethod. * STEP 12: Create the final zip ep_excel = lo_zip->save( ). -endmethod. + endmethod. @@ -507,7 +507,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -730,7 +730,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -855,7 +855,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -954,12 +954,12 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. - METHOD create_xl_charts. + method CREATE_XL_CHARTS. ** Constant node name @@ -1859,7 +1859,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -ENDMETHOD. + endmethod. @@ -1939,7 +1939,7 @@ ENDMETHOD. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -2038,7 +2038,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -2352,7 +2352,7 @@ endmethod. parent = io_document ). ep_anchor->append_child( new_child = lo_element_clientdata ). -endmethod. + endmethod. @@ -2500,7 +2500,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -2617,17 +2617,17 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. - METHOD create_xl_sheet. + method CREATE_XL_SHEET. *--------------------------------------------------------------------* * issue #237 - Error writing column-style -* - Stefan Schmöcker, 2012-11-01 +* - Stefan Schmöcker, 2012-11-01 *--------------------------------------------------------------------* TYPES: BEGIN OF cfvo, @@ -4275,7 +4275,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -ENDMETHOD. + endmethod. @@ -4445,11 +4445,11 @@ ENDMETHOD. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. - method CREATE_XL_STYLES. + METHOD create_xl_styles. ** Constant node name @@ -4596,6 +4596,7 @@ endmethod. lv_fills_count TYPE i, lv_borders_count TYPE i, lv_cellxfs_count TYPE i, + lv_index TYPE i, lv_align_flag TYPE c. ********************************************************************** @@ -5224,6 +5225,45 @@ endmethod. lo_sub_element = lo_document->create_simple_element( name = lc_xml_node_dxf parent = lo_document ). + "Conditional formatting font style correction by Alessandro Iannacci START + lv_index = ls_cellxfs-fontid + 1. + READ TABLE lt_fonts INTO ls_font INDEX lv_index. + IF ls_font IS NOT INITIAL. + lo_element_font = lo_document->create_simple_element( name = lc_xml_node_font + parent = lo_document ). + IF ls_font-bold EQ abap_true. + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_b + parent = lo_document ). + lo_element_font->append_child( new_child = lo_sub_element_2 ). + ENDIF. + IF ls_font-italic EQ abap_true. + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_i + parent = lo_document ). + lo_element_font->append_child( new_child = lo_sub_element_2 ). + ENDIF. + IF ls_font-underline EQ abap_true. + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_u + parent = lo_document ). + lv_value = ls_font-underline_mode. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_val + value = lv_value ). + lo_element_font->append_child( new_child = lo_sub_element_2 ). + ENDIF. + IF ls_font-strikethrough EQ abap_true. + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_strike + parent = lo_document ). + lo_element_font->append_child( new_child = lo_sub_element_2 ). + ENDIF. + "color + create_xl_styles_color_node( + io_document = lo_document + io_parent = lo_element_font + is_color = ls_font-color ). + lo_sub_element->append_child( new_child = lo_element_font ). + ENDIF. + "---Conditional formatting font style correction by Alessandro Iannacci END + + READ TABLE lt_fills INTO ls_fill INDEX ls_cellxfs-fillid. IF ls_fill IS NOT INITIAL. " fill properties @@ -5281,43 +5321,6 @@ endmethod. " dxf node lo_sub_element = lo_document->create_simple_element( name = lc_xml_node_dxf parent = lo_document ). - -"Conditional formatting font style correction by Alessandro Iannacci START - READ TABLE lt_fonts into ls_font INDEX ls_cellxfs-FONTID + 1. - IF ls_font IS NOT INITIAL. - lo_element_font = lo_document->create_simple_element( name = lc_xml_node_font - parent = lo_document ). - IF ls_font-bold EQ abap_true. - lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_b - parent = lo_document ). - lo_element_font->append_child( new_child = lo_sub_element_2 ). - ENDIF. - IF ls_font-italic EQ abap_true. - lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_i - parent = lo_document ). - lo_element_font->append_child( new_child = lo_sub_element_2 ). - ENDIF. - IF ls_font-underline EQ abap_true. - lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_u - parent = lo_document ). - lv_value = ls_font-underline_mode. - lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_val - value = lv_value ). - lo_element_font->append_child( new_child = lo_sub_element_2 ). - ENDIF. - IF ls_font-strikethrough EQ abap_true. - lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_strike - parent = lo_document ). - lo_element_font->append_child( new_child = lo_sub_element_2 ). - ENDIF. - "color - create_xl_styles_color_node( - io_document = lo_document - io_parent = lo_element_font - is_color = ls_font-color ). - lo_sub_element->append_child( new_child = lo_element_font ). - ENDIF. -"---Conditional formatting font style correction by Alessandro Iannacci END READ TABLE lt_fills INTO ls_fill INDEX ls_cellxfs-fillid. IF ls_fill IS NOT INITIAL. @@ -5402,7 +5405,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. +ENDMETHOD. @@ -5453,12 +5456,12 @@ endmethod. ENDIF. io_parent->append_child( new_child = lo_sub_element ). -endmethod. + endmethod. - METHOD create_xl_table. + method CREATE_XL_TABLE. DATA: lc_xml_node_table TYPE string VALUE 'table', lc_xml_node_relationship TYPE string VALUE 'Relationship', @@ -5630,7 +5633,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -ENDMETHOD. + endmethod. @@ -5719,20 +5722,20 @@ ENDMETHOD. buffer = ep_content. -endmethod. + endmethod. method CREATE_XL_WORKBOOK. *--------------------------------------------------------------------* * issue #230 - Pimp my Code -* - Stefan Schmöcker, (done) 2012-11-07 +* - Stefan Schmöcker, (done) 2012-11-07 * - ... * changes: aligning code * adding comments to explain what we are trying to achieve *--------------------------------------------------------------------* * issue#235 - repeat rows/columns -* - Stefan Schmöcker, 2012-12-01 +* - Stefan Schmöcker, 2012-12-01 * changes: correction of pointer to localSheetId *--------------------------------------------------------------------* @@ -5913,7 +5916,7 @@ endmethod. lo_sub_element = lo_document->create_simple_element_ns( name = lc_xml_node_sheet parent = lo_document ). lo_worksheet ?= lo_iterator->if_object_collection_iterator~get_next( ). - lv_syindex = sy-index. " question by Stefan Schmöcker 2012-12-02: sy-index seems to do the job - but is it proven to work or purely coincedence + lv_syindex = sy-index. " question by Stefan Schmöcker 2012-12-02: sy-index seems to do the job - but is it proven to work or purely coincedence lv_value = lo_worksheet->get_title( ). SHIFT lv_syindex RIGHT DELETING TRAILING space. SHIFT lv_syindex LEFT DELETING LEADING space. @@ -6040,7 +6043,7 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -endmethod. + endmethod. @@ -6053,7 +6056,7 @@ endmethod. ELSE. ep_boolean = 'false'. ENDIF. -endmethod. + endmethod. @@ -6066,6 +6069,6 @@ endmethod. READ TABLE shared_strings INTO ls_shared_string WITH KEY string_value = ip_cell_value BINARY SEARCH. ep_index = ls_shared_string-string_no. -endmethod. + endmethod.