mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 14:06:24 +08:00
set ready to test #229: Set active worksheet in readerclass
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@357 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
This commit is contained in:
parent
901a75fe40
commit
9f65e6f7f8
|
@ -1115,7 +1115,7 @@ endmethod.</source>
|
|||
<parameter CLSNAME="ZCL_EXCEL_READER_2007" CMPNAME="LOAD_WORKBOOK" SCONAME="IP_PATH" VERSION="1" LANGU="E" CMPTYPE="1" MTDTYPE="0" EDITORDER="1 " DISPID="0 " PARDECLTYP="0" PARPASSTYP="1" TYPTYPE="1" TYPE="STRING"/>
|
||||
<parameter CLSNAME="ZCL_EXCEL_READER_2007" CMPNAME="LOAD_WORKBOOK" SCONAME="IP_EXCEL" VERSION="1" LANGU="E" DESCRIPT="Excel creator" CMPTYPE="1" MTDTYPE="0" EDITORDER="2 " DISPID="0 " PARDECLTYP="0" PARPASSTYP="1" TYPTYPE="3" TYPE="ZCL_EXCEL"/>
|
||||
<exception CLSNAME="ZCL_EXCEL_READER_2007" CMPNAME="LOAD_WORKBOOK" SCONAME="ZCX_EXCEL" VERSION="1" LANGU="E" DESCRIPT="Exceptions for ABAP2XLSX" MTDTYPE="0" EDITORDER="1 "/>
|
||||
<source>method LOAD_WORKBOOK.
|
||||
<source>METHOD load_workbook.
|
||||
|
||||
CONSTANTS: lc_shared_strings TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',
|
||||
lc_worksheet TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',
|
||||
|
@ -1142,6 +1142,15 @@ endmethod.</source>
|
|||
range TYPE t_range,
|
||||
range_value TYPE zexcel_range_value.
|
||||
|
||||
*--------------------------------------------------------------------*
|
||||
* #229: Set active worksheet - begin data declarations
|
||||
*--------------------------------------------------------------------*
|
||||
DATA: lv_active_sheet_string TYPE string,
|
||||
lv_zexcel_active_worksheet TYPE zexcel_active_worksheet.
|
||||
*--------------------------------------------------------------------*
|
||||
* #229: Set active worksheet - end data declarations
|
||||
*--------------------------------------------------------------------*
|
||||
|
||||
|
||||
FIELD-SYMBOLS: <worksheet> TYPE t_relationship.
|
||||
|
||||
|
@ -1216,6 +1225,7 @@ endmethod.</source>
|
|||
ADD 1 TO workbook_index.
|
||||
ENDWHILE.
|
||||
|
||||
|
||||
"Can I reuse the workbook variable?
|
||||
"workbook = me->get_ixml_from_zip_archive( ip_path ).
|
||||
node ?= workbook->find_from_name( 'definedName' ).
|
||||
|
@ -1236,7 +1246,24 @@ endmethod.</source>
|
|||
node ?= node->get_next( ).
|
||||
ENDWHILE.
|
||||
|
||||
endmethod.</source>
|
||||
*--------------------------------------------------------------------*
|
||||
* #229: Set active worksheet - begin coding
|
||||
*--------------------------------------------------------------------*
|
||||
lv_zexcel_active_worksheet = 1. " First sheet = active sheet if nothing else specified.
|
||||
node ?= workbook->find_from_name( 'workbookView' ).
|
||||
IF node IS BOUND.
|
||||
lv_active_sheet_string = node->get_attribute( 'activeTab' ).
|
||||
TRY.
|
||||
lv_zexcel_active_worksheet = lv_active_sheet_string + 1. " EXCEL numbers the sheets from 0 onwards --> index into worksheettable needs to be one more
|
||||
CATCH cx_sy_conversion_error.
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
ip_excel->set_active_sheet_index( lv_zexcel_active_worksheet ).
|
||||
*--------------------------------------------------------------------*
|
||||
* #229: Set active worksheet - end coding
|
||||
*--------------------------------------------------------------------*
|
||||
|
||||
ENDMETHOD.</source>
|
||||
</method>
|
||||
<method CLSNAME="ZCL_EXCEL_READER_2007" CMPNAME="LOAD_WORKSHEET" VERSION="1" LANGU="E" DESCRIPT="Loads worksheet" EXPOSURE="1" STATE="1" EDITORDER="7 " DISPID="0 " MTDTYPE="0" MTDDECLTYP="0" MTDNEWEXC="X" BCMTDCAT="00" BCMTDSYN="0">
|
||||
<parameter CLSNAME="ZCL_EXCEL_READER_2007" CMPNAME="LOAD_WORKSHEET" SCONAME="IP_PATH" VERSION="1" LANGU="E" CMPTYPE="1" MTDTYPE="0" EDITORDER="1 " DISPID="0 " PARDECLTYP="0" PARPASSTYP="1" TYPTYPE="1" TYPE="STRING"/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user