From b29a66658510d16368e266b16f793ef9ca61b49d Mon Sep 17 00:00:00 2001 From: Ivan Femia Date: Sun, 14 Oct 2012 13:25:03 +0000 Subject: [PATCH] ready to test #205 git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@339 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049 --- ZA2X/CLAS/ZCL_EXCEL_WRITER_XLSM.slnk | 34 +++++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/ZA2X/CLAS/ZCL_EXCEL_WRITER_XLSM.slnk b/ZA2X/CLAS/ZCL_EXCEL_WRITER_XLSM.slnk index e5b5d9d..7108676 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WRITER_XLSM.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WRITER_XLSM.slnk @@ -1,5 +1,5 @@ - - + + class ZCL_EXCEL_WRITER_XLSM definition public inheriting from ZCL_EXCEL_WRITER_2007 @@ -36,15 +36,15 @@ public section. *"* components in the private section *"* use this source file for any macro definitions you need *"* in the implementation part of the class - - + + - + method CREATE. @@ -200,8 +200,7 @@ public section. ********************************************************************** * STEP 11: Add media - lo_iterator = me->excel->get_drawings_iterator( ). - + lo_iterator = me->excel->get_drawings_iterator( zcl_excel_drawing=>type_image ). WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true. lo_drawing ?= lo_iterator->if_object_collection_iterator~get_next( ). @@ -212,6 +211,19 @@ public section. content = lv_content ). ENDWHILE. +********************************************************************** +* STEP 12: Add charts + lo_iterator = me->excel->get_drawings_iterator( zcl_excel_drawing=>type_chart ). + WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true. + lo_drawing ?= lo_iterator->if_object_collection_iterator~get_next( ). + + lv_content = lo_drawing->get_media( ). + lv_value = lo_drawing->get_media_name( ). + CONCATENATE 'xl/charts/' lv_value INTO lv_value. + lo_zip->add( name = lv_value + content = lv_content ). + ENDWHILE. + ********************************************************************** * STEP 9: Add vbaProject.bin to zip lo_zip->add( name = me->c_xl_vbaproject @@ -223,7 +235,7 @@ public section. endmethod. - + method CREATE_CONTENT_TYPES. ** Constant node name DATA: lc_xml_node_workb_ct TYPE string VALUE 'application/vnd.ms-excel.sheet.macroEnabled.main+xml', @@ -305,7 +317,7 @@ endmethod. endmethod. - + method CREATE_XL_RELATIONSHIPS. ** Constant node name @@ -383,7 +395,7 @@ endmethod. endmethod. - + method CREATE_XL_SHEET. ** Constant node name @@ -447,7 +459,7 @@ endmethod. lo_renderer->render( ). endmethod. - + method CREATE_XL_WORKBOOK. ** Constant node name