mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 13:46:17 +08:00
commit
d1169189e9
|
@ -1362,6 +1362,9 @@ ENDMETHOD.</source>
|
||||||
lv_module TYPE int4,
|
lv_module TYPE int4,
|
||||||
lv_column TYPE zexcel_cell_column.
|
lv_column TYPE zexcel_cell_column.
|
||||||
|
|
||||||
|
STATICS: sv_prev_in LIKE lv_column,
|
||||||
|
sv_prev_out LIKE ep_column.
|
||||||
|
|
||||||
* Propagate zcx_excel if error occurs " issue #155 - less restrictive typing for ip_column
|
* Propagate zcx_excel if error occurs " issue #155 - less restrictive typing for ip_column
|
||||||
lv_column = convert_column2int( ip_column ). " issue #155 - less restrictive typing for ip_column
|
lv_column = convert_column2int( ip_column ). " issue #155 - less restrictive typing for ip_column
|
||||||
|
|
||||||
|
@ -1375,6 +1378,17 @@ ENDMETHOD.</source>
|
||||||
error = 'Index out of bounds'.
|
error = 'Index out of bounds'.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
* Look up for previous succesfull cached result
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
IF lv_column = sv_prev_in AND sv_prev_out IS NOT INITIAL.
|
||||||
|
ep_column = sv_prev_out.
|
||||||
|
RETURN.
|
||||||
|
ELSE.
|
||||||
|
CLEAR sv_prev_out.
|
||||||
|
sv_prev_in = lv_column.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
* Build alpha representation of column
|
* Build alpha representation of column
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
|
@ -1390,6 +1404,11 @@ ENDMETHOD.</source>
|
||||||
|
|
||||||
ENDWHILE.
|
ENDWHILE.
|
||||||
|
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
* Save succesfull output into cache
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
sv_prev_out = ep_column.
|
||||||
|
|
||||||
ENDMETHOD.</source>
|
ENDMETHOD.</source>
|
||||||
</method>
|
</method>
|
||||||
<method CLSNAME="ZCL_EXCEL_COMMON" CMPNAME="CONVERT_COLUMN2INT" VERSION="1" LANGU="E" DESCRIPT="Convert column indicator to Integer" EXPOSURE="2" STATE="1" EDITORDER="4 " DISPID="0 " MTDTYPE="0" MTDDECLTYP="1" MTDNEWEXC="X" BCMTDCAT="00" BCMTDSYN="0">
|
<method CLSNAME="ZCL_EXCEL_COMMON" CMPNAME="CONVERT_COLUMN2INT" VERSION="1" LANGU="E" DESCRIPT="Convert column indicator to Integer" EXPOSURE="2" STATE="1" EDITORDER="4 " DISPID="0 " MTDTYPE="0" MTDDECLTYP="1" MTDNEWEXC="X" BCMTDCAT="00" BCMTDSYN="0">
|
||||||
|
@ -1423,6 +1442,8 @@ ENDMETHOD.</source>
|
||||||
lv_errormessage TYPE string, " Can't pass '...'(abc) to exception-class
|
lv_errormessage TYPE string, " Can't pass '...'(abc) to exception-class
|
||||||
lv_modulo TYPE i.
|
lv_modulo TYPE i.
|
||||||
|
|
||||||
|
STATICS: sv_prev_in LIKE lv_column_c,
|
||||||
|
sv_prev_out LIKE ep_column.
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
* This module tries to identify which column a user wants to access
|
* This module tries to identify which column a user wants to access
|
||||||
* Numbers as input are just passed back, anything else will be converted
|
* Numbers as input are just passed back, anything else will be converted
|
||||||
|
@ -1447,6 +1468,17 @@ ENDMETHOD.</source>
|
||||||
syst_at_raise = syst.
|
syst_at_raise = syst.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
* Look up for previous succesfull cached result
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
IF lv_column_c = sv_prev_in AND sv_prev_out IS NOT INITIAL.
|
||||||
|
ep_column = sv_prev_out.
|
||||||
|
RETURN.
|
||||||
|
ELSE.
|
||||||
|
CLEAR sv_prev_out.
|
||||||
|
sv_prev_in = lv_column_c.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
* If a number gets passed, just convert it to an integer and return
|
* If a number gets passed, just convert it to an integer and return
|
||||||
* the converted value
|
* the converted value
|
||||||
|
@ -1484,6 +1516,7 @@ ENDMETHOD.</source>
|
||||||
syst_at_raise = syst.
|
syst_at_raise = syst.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
DO 1 TIMES. "Because of using CHECK
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
* Interpret input as number to base 26 with A=1, ... Z=26
|
* Interpret input as number to base 26 with A=1, ... Z=26
|
||||||
* Raise error if unexpected character turns up
|
* Raise error if unexpected character turns up
|
||||||
|
@ -1537,6 +1570,7 @@ ENDMETHOD.</source>
|
||||||
syst_at_raise = syst.
|
syst_at_raise = syst.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ep_column = 26 * ep_column + lv_modulo. " if third digit is present first digit is for 26^2 and second digit for 26^1
|
ep_column = 26 * ep_column + lv_modulo. " if third digit is present first digit is for 26^2 and second digit for 26^1
|
||||||
|
ENDDO.
|
||||||
|
|
||||||
*--------------------------------------------------------------------*
|
*--------------------------------------------------------------------*
|
||||||
* Maximum column for EXCEL: XFD = 16384 " if anyone has a reference for this information - please add here instead of this comment
|
* Maximum column for EXCEL: XFD = 16384 " if anyone has a reference for this information - please add here instead of this comment
|
||||||
|
@ -1548,6 +1582,10 @@ ENDMETHOD.</source>
|
||||||
error = lv_errormessage.
|
error = lv_errormessage.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
* Save succesfull output into cache
|
||||||
|
*--------------------------------------------------------------------*
|
||||||
|
sv_prev_out = ep_column.
|
||||||
|
|
||||||
ENDMETHOD.</source>
|
ENDMETHOD.</source>
|
||||||
</method>
|
</method>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user