*"* use this source file for the definition and implementation of *"* local helper classes, interface definitions and type *"* declarations *"* use this source file for any type of declarations (class *"* definitions, interfaces or type declarations) you need for *"* components in the private section *"* use this source file for any macro definitions you need *"* in the implementation part of the class METHOD load_vbaproject. DATA lv_content TYPE xstring. lv_content = me->get_from_zip_archive( ip_path ). ip_excel->zif_excel_book_vba_project~set_vbaproject( lv_content ). ENDMETHOD. method LOAD_WORKBOOK. super->load_workbook( EXPORTING iv_workbook_full_filename = iv_workbook_full_filename io_excel = io_excel ). CONSTANTS: lc_vba_project TYPE string VALUE 'http://schemas.microsoft.com/office/2006/relationships/vbaProject'. DATA: rels_workbook_path TYPE string, rels_workbook TYPE REF TO if_ixml_document, path TYPE string, node TYPE REF TO if_ixml_element, workbook TYPE REF TO if_ixml_document, stripped_name TYPE chkfile, dirname TYPE string, relationship TYPE t_relationship, fileversion TYPE t_fileversion, workbookpr TYPE t_workbookpr. FIELD-SYMBOLS: <worksheet> TYPE t_relationship. CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH' EXPORTING full_name = iv_workbook_full_filename IMPORTING stripped_name = stripped_name file_path = dirname. " Read Workbook Relationships CONCATENATE dirname '_rels/' stripped_name '.rels' INTO rels_workbook_path. rels_workbook = me->get_ixml_from_zip_archive( rels_workbook_path ). node ?= rels_workbook->find_from_name( 'Relationship' ). WHILE node IS BOUND. me->fill_struct_from_attributes( EXPORTING ip_element = node CHANGING cp_structure = relationship ). CASE relationship-type. WHEN lc_vba_project. " Read VBA binary CONCATENATE dirname relationship-target INTO path. me->load_vbaproject( ip_path = path ip_excel = io_excel ). WHEN OTHERS. ENDCASE. node ?= node->get_next( ). ENDWHILE. " Read Workbook codeName workbook = me->get_ixml_from_zip_archive( iv_workbook_full_filename ). node ?= workbook->find_from_name( 'fileVersion' ). IF node IS BOUND. fill_struct_from_attributes( EXPORTING ip_element = node CHANGING cp_structure = fileversion ). io_excel->zif_excel_book_vba_project~set_codename( fileversion-codename ). ENDIF. " Read Workbook codeName workbook = me->get_ixml_from_zip_archive( iv_workbook_full_filename ). node ?= workbook->find_from_name( 'workbookPr' ). IF node IS BOUND. fill_struct_from_attributes( EXPORTING ip_element = node CHANGING cp_structure = workbookpr ). io_excel->zif_excel_book_vba_project~set_codename_pr( workbookpr-codename ). ENDIF. endmethod. METHOD load_worksheet. super->load_worksheet( EXPORTING ip_path = ip_path io_worksheet = io_worksheet ). DATA: path TYPE string, node TYPE REF TO if_ixml_element, worksheet TYPE REF TO if_ixml_document, sheetpr TYPE t_sheetpr. " Read Workbook codeName worksheet = me->get_ixml_from_zip_archive( ip_path ). node ?= worksheet->find_from_name( 'sheetPr' ). IF node IS BOUND. fill_struct_from_attributes( EXPORTING ip_element = node CHANGING cp_structure = sheetpr ). IF sheetpr-codename IS NOT INITIAL. io_worksheet->zif_excel_sheet_vba_project~set_codename_pr( sheetpr-codename ). ENDIF. ENDIF. ENDMETHOD.