From a200b573e7cc0a4ca28f369d8594dc0ac656e1d8 Mon Sep 17 00:00:00 2001 From: Rene Turnheim Date: Wed, 29 Aug 2012 01:15:10 +0000 Subject: [PATCH] Fixed #202 issue. Added hex type to string conversion case for excel. As hex data type is not supported by Excel. git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@334 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049 --- ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk | 622 +++++++++++++++-------------- 1 file changed, 313 insertions(+), 309 deletions(-) diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index d3d8e9c..3a2ad11 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,8 +1,8 @@ - + - - - + + + class ZCL_EXCEL_WORKSHEET definition public final @@ -586,6 +586,9 @@ endclass. *"* use this source file for any macro definitions you need *"* in the implementation part of the class + + + @@ -599,40 +602,40 @@ endclass. ABAP SLIS SOI - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + method ZIF_EXCEL_SHEET_PROPERTIES~GET_STYLE. IF zif_excel_sheet_properties~style IS NOT INITIAL. @@ -697,8 +700,8 @@ endmethod. me->zif_excel_sheet_vba_project~codename_pr = ip_codename_pr. endmethod. - - + + method ADD_DRAWING. CASE ip_drawing->get_type( ). WHEN zcl_excel_drawing=>type_image. @@ -708,29 +711,29 @@ endmethod. ENDCASE. endmethod. - - + + method ADD_NEW_CONDITIONAL_STYLE. CREATE OBJECT eo_conditional_style. conditional_styles->add( eo_conditional_style ). endmethod. - - + + method ADD_NEW_DATA_VALIDATION. CREATE OBJECT eo_data_validation. data_validations->add( eo_data_validation ). endmethod. - - - - - - - + + + + + + + method BIND_ALV. data: lo_converter type ref to zcl_excel_converter. @@ -753,26 +756,26 @@ endmethod. endmethod. - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + method BIND_ALV_OLE2. *--------------------------------------------------------------------* * Method description: @@ -2842,11 +2845,11 @@ endmethod. close_document. endmethod. - - - - - + + + + + method BIND_TABLE. @@ -3017,11 +3020,11 @@ endmethod. endmethod. - - - - - + + + + + method CALCULATE_CELL_WIDTH. DATA: cell_value TYPE zexcel_cell_value, guid TYPE zexcel_cell_style, @@ -3046,7 +3049,7 @@ endmethod. endmethod. - + method CALCULATE_COLUMN_WIDTHS. TYPES: @@ -3125,107 +3128,107 @@ endmethod. endmethod. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + method CHANGE_CELL_STYLE. " issue # 139 DATA: stylemapping TYPE zexcel_s_stylemapping, @@ -3524,10 +3527,10 @@ endmethod. endmethod. - - - - + + + + method CONSTRUCTOR. DATA: lv_title TYPE zexcel_sheet_title. @@ -3574,7 +3577,7 @@ endmethod. endmethod. - + method DELETE_MERGE. DELETE sheet_content_merge INDEX 1. @@ -3582,10 +3585,10 @@ endmethod. endmethod. - - - - + + + + method FREEZE_PANES. data: lv_xsplit type i, lv_ysplit type i. @@ -3612,8 +3615,8 @@ endmethod. freeze_pane_cell_row = ip_num_rows + 1. endmethod. - - + + method GENERATE_TITLE. DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator, lo_worksheet TYPE REF TO zcl_excel_worksheet, @@ -3647,8 +3650,8 @@ endmethod. ENDDO. endmethod. - - + + method GET_ACTIVE_CELL. @@ -3663,14 +3666,14 @@ endmethod. endmethod. - - - - - - - - + + + + + + + + method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -3702,10 +3705,10 @@ endmethod. ENDIF. endmethod. - - - - + + + + method GET_COLUMN_DIMENSION. FIELD-SYMBOLS: <fs_column_dimension> LIKE LINE OF column_dimensions. DATA: lv_column_alpha TYPE zexcel_cell_column_alpha. " issue #155 - less restrictive typing for ip_column @@ -3729,34 +3732,34 @@ endmethod. endmethod. - - + + method GET_COLUMN_DIMENSIONS. r_column_dimension[] = me->column_dimensions[]. endmethod. - - + + method GET_COND_STYLES_ITERATOR. eo_iterator = me->conditional_styles->get_iterator( ). endmethod. - - + + method GET_DATA_VALIDATIONS_ITERATOR. eo_iterator = me->data_validations->get_iterator( ). endmethod. - - + + method GET_DATA_VALIDATIONS_SIZE. ep_size = me->data_validations->size( ). endmethod. - - + + method GET_DEFAULT_COLUMN_DIMENSION. IF me->default_column_dimension IS NOT BOUND. CREATE OBJECT me->default_column_dimension @@ -3769,8 +3772,8 @@ endmethod. r_column_dimension = me->default_column_dimension. endmethod. - - + + method GET_DEFAULT_EXCEL_DATE_FORMAT. CONSTANTS: c_lang_e TYPE lang VALUE 'E'. @@ -3795,8 +3798,8 @@ endmethod. ep_default_excel_date_format = default_excel_date_format. endmethod. - - + + method GET_DEFAULT_EXCEL_TIME_FORMAT. DATA: l_timefm TYPE xutimefm. @@ -3831,8 +3834,8 @@ endmethod. ep_default_excel_time_format = default_excel_time_format. endmethod. - - + + method GET_DEFAULT_ROW_DIMENSION. IF me->default_row_dimension IS NOT BOUND. CREATE OBJECT me->default_row_dimension. @@ -3841,8 +3844,8 @@ endmethod. r_row_dimension = me->default_row_dimension. endmethod. - - + + method GET_DIMENSION_RANGE. @@ -3861,9 +3864,9 @@ endmethod. endmethod. - + - + method GET_DRAWINGS. DATA: lo_drawing TYPE REF TO zcl_excel_drawing, @@ -3893,9 +3896,9 @@ endmethod. ENDCASE. endmethod. - + - + method GET_DRAWINGS_ITERATOR. CASE ip_type. WHEN zcl_excel_drawing=>type_image. @@ -3905,52 +3908,52 @@ endmethod. ENDCASE. endmethod. - - - + + + method GET_FREEZE_CELL. ep_row = me->freeze_pane_cell_row. ep_column = me->freeze_pane_cell_column. endmethod. - - + + method GET_GUID. ep_guid = me->guid. endmethod. - - + + method GET_HIGHEST_COLUMN. me->update_dimension_range( ). r_highest_column = me->lower_cell-cell_column. endmethod. - - + + method GET_HIGHEST_ROW. me->update_dimension_range( ). r_highest_row = me->lower_cell-cell_row. endmethod. - - + + method GET_HYPERLINKS_ITERATOR. eo_iterator = hyperlinks->get_iterator( ). endmethod. - - + + method GET_HYPERLINKS_SIZE. ep_size = hyperlinks->size( ). endmethod. - - + + method GET_MERGE. @@ -4025,9 +4028,9 @@ endmethod. endmethod. - - - + + + method GET_ROW_DIMENSION. FIELD-SYMBOLS: <fs_row_dimension> LIKE LINE OF row_dimensions. @@ -4047,27 +4050,27 @@ endmethod. endmethod. - - + + method GET_ROW_DIMENSIONS. r_row_dimension[] = me->row_dimensions[]. endmethod. - - + + method GET_TABLES_ITERATOR. eo_iterator = tables->if_object_collection~get_iterator( ). endmethod. - - + + method GET_TABLES_SIZE. ep_size = tables->if_object_collection~size( ). endmethod. - - - + + + method GET_TITLE. DATA lv_value TYPE string. IF ip_escaped EQ abap_true. @@ -4078,10 +4081,10 @@ endmethod. ENDIF. endmethod. - - - - + + + + method GET_VALUE_TYPE. DATA: lo_addit TYPE REF TO cl_abap_elemdescr, ls_dfies TYPE dfies, @@ -4135,16 +4138,16 @@ endmethod. endmethod. - - - - - - - - - - + + + + + + + + + + method SET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -4232,7 +4235,8 @@ endmethod. lv_value = zcl_excel_common=>number_to_excel_string( ip_value = <fs_numeric> ). ENDIF. - WHEN cl_abap_typedescr=>typekind_char OR cl_abap_typedescr=>typekind_string OR cl_abap_typedescr=>typekind_num. + WHEN cl_abap_typedescr=>typekind_char OR cl_abap_typedescr=>typekind_string OR cl_abap_typedescr=>typekind_num or + cl_abap_typedescr=>typekind_hex. lv_value = <fs_value>. lv_data_type = 's'. @@ -4361,11 +4365,11 @@ endmethod. endmethod. - - - - - + + + + + method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, @@ -4391,11 +4395,11 @@ endmethod. endmethod. - - - - - + + + + + method SET_COLUMN_WIDTH. DATA: column_dimension TYPE REF TO zcl_excel_worksheet_columndime. DATA: width TYPE float. @@ -4427,8 +4431,8 @@ endmethod. endmethod. - - + + method SET_DEFAULT_EXCEL_DATE_FORMAT. @@ -4441,11 +4445,11 @@ endmethod. default_excel_date_format = ip_default_excel_date_format. endmethod. - - - - - + + + + + method SET_MERGE. @@ -4483,16 +4487,16 @@ endmethod. endmethod. - - + + method SET_PRINT_GRIDLINES. me->print_gridlines = i_print_gridlines. endmethod. - - - - + + + + method SET_ROW_HEIGHT. DATA: row_dimension TYPE REF TO zcl_excel_worksheet_rowdimensi. DATA: height TYPE float. @@ -4520,25 +4524,25 @@ endmethod. endmethod. - - + + method SET_SHOW_GRIDLINES. me->show_gridlines = i_show_gridlines. endmethod. - - + + method SET_SHOW_ROWCOLHEADERS. me->show_rowcolheaders = i_show_rowcolheaders. endmethod. - - - - - - - + + + + + + + @@ -4616,9 +4620,9 @@ endmethod. endmethod. - - - + + + method SET_TITLE. DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator, lo_worksheet TYPE REF TO zcl_excel_worksheet, @@ -4652,7 +4656,7 @@ endmethod. me->title = ip_title. endmethod. - + method UPDATE_DIMENSION_RANGE.