diff --git a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk index ee4a728..a355f8f 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WRITER_2007.slnk @@ -1,6 +1,6 @@ - - + + class ZCL_EXCEL_WRITER_2007 definition public final @@ -112,34 +112,32 @@ private section. *"* implementation or private method's signature *"* use this source file for any macro definitions you need *"* in the implementation part of the class - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + method ZIF_EXCEL_WRITER~WRITE_FILE. me->excel = io_excel. ep_file = me->create( ). endmethod. - - + + method CREATE. @@ -308,10 +306,9 @@ endmethod. ep_excel = lo_zip->save( ). endmethod. - - - + + method CREATE_CONTENT_TYPES. @@ -563,10 +560,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_DOCPROPS_APP. @@ -785,10 +781,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_DOCPROPS_CORE. @@ -902,10 +897,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_RELATIONSHIPS. @@ -1002,11 +996,10 @@ endmethod. lo_renderer->render( ). endmethod. - - - - + + + method CREATE_XL_DRAWINGS. @@ -1233,11 +1226,10 @@ endmethod. lo_renderer->render( ). endmethod. - - - - + + + method CREATE_XL_DRAWINGS_RELS. ** Constant node name @@ -1320,10 +1312,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_XL_RELATIONSHIPS. @@ -1469,10 +1460,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_XL_SHAREDSTRINGS. @@ -1587,13 +1577,12 @@ endmethod. lo_renderer->render( ). endmethod. - - - - - - METHOD create_xl_sheet. + + + + + method CREATE_XL_SHEET. ** Constant node name DATA: lc_xml_node_worksheet TYPE string VALUE 'worksheet', @@ -2757,13 +2746,12 @@ endmethod. lo_renderer = lo_ixml->create_renderer( ostream = lo_ostream document = lo_document ). lo_renderer->render( ). -ENDMETHOD. - +endmethod. - - - - + + + + method CREATE_XL_SHEET_RELS. @@ -2904,10 +2892,9 @@ ENDMETHOD. lo_renderer->render( ). endmethod. - - - + + method CREATE_XL_STYLES. @@ -3521,30 +3508,6 @@ endmethod. lo_element->set_attribute_ns( name = lc_xml_attr_applyborder value = lv_value ). ENDIF. - IF ls_cellxfs-applyprotection EQ 1. - MOVE ls_cellxfs-applyprotection TO lv_value. - CONDENSE lv_value NO-GAPS. - lo_element->set_attribute_ns( name = lc_xml_attr_applyprotection - value = lv_value ). - lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_protection - parent = lo_document ). - ADD 1 TO ls_cellxfs-protectionid. "Table index starts from 1 - READ TABLE lt_protections INTO ls_protection INDEX ls_cellxfs-protectionid. - SUBTRACT 1 FROM ls_cellxfs-protectionid. - IF ls_protection-locked IS NOT INITIAL. - MOVE ls_protection-locked TO lv_value. - CONDENSE lv_value. - lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_locked - value = lv_value ). - ENDIF. - IF ls_protection-hidden IS NOT INITIAL. - MOVE ls_protection-hidden TO lv_value. - CONDENSE lv_value. - lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_hidden - value = lv_value ). - ENDIF. - lo_element->append_child( new_child = lo_sub_element_2 ). - ENDIF. IF ls_cellxfs-applyalignment EQ 1. " depends on each style not for all the sheet MOVE ls_cellxfs-applyalignment TO lv_value. SHIFT lv_value RIGHT DELETING TRAILING space. @@ -3591,6 +3554,30 @@ endmethod. lo_element->append_child( new_child = lo_sub_element_2 ). ENDIF. + IF ls_cellxfs-applyprotection EQ 1. + MOVE ls_cellxfs-applyprotection TO lv_value. + CONDENSE lv_value NO-GAPS. + lo_element->set_attribute_ns( name = lc_xml_attr_applyprotection + value = lv_value ). + lo_sub_element_2 = lo_document->create_simple_element( name = lc_xml_node_protection + parent = lo_document ). + ADD 1 TO ls_cellxfs-protectionid. "Table index starts from 1 + READ TABLE lt_protections INTO ls_protection INDEX ls_cellxfs-protectionid. + SUBTRACT 1 FROM ls_cellxfs-protectionid. + IF ls_protection-locked IS NOT INITIAL. + MOVE ls_protection-locked TO lv_value. + CONDENSE lv_value. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_locked + value = lv_value ). + ENDIF. + IF ls_protection-hidden IS NOT INITIAL. + MOVE ls_protection-hidden TO lv_value. + CONDENSE lv_value. + lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_hidden + value = lv_value ). + ENDIF. + lo_element->append_child( new_child = lo_sub_element_2 ). + ENDIF. lo_element_cellxfs->append_child( new_child = lo_element ). ENDLOOP. @@ -3640,11 +3627,10 @@ endmethod. lo_renderer->render( ). endmethod. - - - - + + + method CREATE_XL_TABLE. DATA: lc_xml_node_table TYPE string VALUE 'table', @@ -3812,10 +3798,9 @@ endmethod. lo_renderer->render( ). endmethod. - - - + + method CREATE_XL_THEME. @@ -3902,10 +3887,9 @@ endmethod. endmethod. - - - + + method CREATE_XL_WORKBOOK. @@ -4126,11 +4110,10 @@ endmethod. lo_renderer->render( ). endmethod. - - - - + + + method FLAG2BOOL. @@ -4140,11 +4123,10 @@ endmethod. ep_boolean = 'false'. ENDIF. endmethod. - - - - + + + method GET_SHARED_STRING_INDEX. @@ -4154,6 +4136,5 @@ endmethod. ep_index = ls_shared_string-string_no. endmethod. -