diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 8fce3dd..83bd18a 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,6 +1,6 @@ - - + + class ZCL_EXCEL_WORKSHEET definition public final @@ -373,34 +373,34 @@ endclass. ABAP SLIS SOI - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + method ZIF_EXCEL_SHEET_PROTECTION~INITIALIZE. @@ -427,48 +427,48 @@ endclass. endmethod. - - + + method ADD_DRAWING. drawings->add( ip_drawing ). 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. *--------------------------------------------------------------------* * Method description: @@ -2538,10 +2538,10 @@ endmethod. close_document. endmethod. - - - - + + + + method BIND_TABLE. DATA: @@ -2664,7 +2664,7 @@ endmethod. endmethod. - + method CALCULATE_COLUMN_WIDTHS. TYPES: BEGIN OF t_auto_size, @@ -2726,9 +2726,9 @@ endmethod. endmethod. - - - + + + method CONSTRUCTOR. me->excel = ip_excel. @@ -2764,7 +2764,7 @@ endmethod. upper_cell-cell_column = 1. endmethod. - + method DELETE_MERGE. DELETE sheet_content_merge INDEX 1. @@ -2772,10 +2772,10 @@ endmethod. endmethod. - - - - + + + + method FREEZE_PANES. data: lv_xsplit type i, lv_ysplit type i. @@ -2802,8 +2802,8 @@ endmethod. freeze_pane_cell_row = ip_num_rows + 1. endmethod. - - + + method GET_ACTIVE_CELL. DATA: lv_active_column TYPE zexcel_cell_column_alpha, @@ -2817,11 +2817,11 @@ endmethod. endmethod. - - - - - + + + + + method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -2838,9 +2838,9 @@ endmethod. ep_value = ls_sheet_content-cell_value. endmethod. - - - + + + method GET_COLUMN_DIMENSION. FIELD-SYMBOLS: <fs_column_dimension> LIKE LINE OF column_dimensions. @@ -2860,46 +2860,72 @@ 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. r_column_dimension = me->default_column_dimension. endmethod. - - + + + method GET_DEFAULT_EXCEL_DATE_FORMAT. + CONSTANTS: c_lang_e TYPE lang VALUE 'E'. + + IF default_excel_date_format IS NOT INITIAL. + ep_default_excel_date_format = default_excel_date_format. + RETURN. + ENDIF. + + "try to get defaults + TRY. + cl_abap_datfm=>get_date_format_des( EXPORTING im_langu = c_lang_e + IMPORTING ex_dateformat = default_excel_date_format ). + CATCH cx_abap_datfm_format_unknown. + + ENDTRY. + + " and fallback to fixed format + IF default_excel_date_format IS INITIAL. + default_excel_date_format = zcl_excel_style_number_format=>c_format_date_ddmmyyyydot. + ENDIF. + + ep_default_excel_date_format = default_excel_date_format. +endmethod. + + + method GET_DEFAULT_ROW_DIMENSION. r_row_dimension = me->default_row_dimension. endmethod. - - + + method GET_DIMENSION_RANGE. me->update_dimension_range( ). @@ -2911,62 +2937,62 @@ endmethod. endmethod. - - + + method GET_DRAWINGS. r_drawings = drawings. endmethod. - - + + method GET_DRAWINGS_ITERATOR. eo_iterator = drawings->get_iterator( ). 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. DATA: lv_column_start TYPE string, @@ -3037,9 +3063,9 @@ endmethod. endmethod. - - - + + + method GET_ROW_DIMENSION. FIELD-SYMBOLS: <fs_row_dimension> LIKE LINE OF row_dimensions. @@ -3059,31 +3085,31 @@ 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 SET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -3168,19 +3194,20 @@ endmethod. SHIFT lv_row_alpha RIGHT DELETING TRAILING space. SHIFT lv_row_alpha LEFT DELETING LEADING space. CONCATENATE ip_column lv_row_alpha INTO ls_sheet_content-cell_coords. - APPEND ls_sheet_content TO sheet_content. - SORT sheet_content BY cell_row cell_column. + INSERT ls_sheet_content INTO TABLE sheet_content. +* APPEND ls_sheet_content TO sheet_content. +* SORT sheet_content BY cell_row cell_column. " me->update_dimension_range( ). ENDIF. endmethod. - - - - - + + + + + method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, @@ -3206,10 +3233,23 @@ endmethod. endmethod. - - - - + + + method SET_DEFAULT_EXCEL_DATE_FORMAT. + + IF ip_default_excel_date_format IS INITIAL. + RAISE EXCEPTION TYPE zcx_excel + EXPORTING + error = 'Default date format cannot be blank'. + ENDIF. + + default_excel_date_format = ip_default_excel_date_format. +endmethod. + + + + + method SET_MERGE. DATA: lv_column_start TYPE zexcel_cell_column, @@ -3240,13 +3280,13 @@ endmethod. endmethod. - - - - - - - + + + + + + + method SET_TABLE. DATA: lo_tabdescr TYPE REF TO cl_abap_structdescr, @@ -3303,7 +3343,7 @@ endmethod. endmethod. - + method UPDATE_DIMENSION_RANGE. DATA: ls_sheet_content TYPE zexcel_s_cell_data, @@ -3343,45 +3383,4 @@ endmethod. endmethod. - - - METHOD set_default_excel_date_format. - - IF ip_default_excel_date_format IS INITIAL. - RAISE EXCEPTION TYPE zcx_excel - EXPORTING - error = 'Default date format cannot be blank'. - ENDIF. - - default_excel_date_format = ip_default_excel_date_format. -ENDMETHOD. - - - - - METHOD get_default_excel_date_format. - CONSTANTS: c_lang_e TYPE lang VALUE 'E'. - - IF default_excel_date_format IS NOT INITIAL. - ep_default_excel_date_format = default_excel_date_format. - RETURN. - ENDIF. - - "try to get defaults - TRY. - cl_abap_datfm=>get_date_format_des( EXPORTING im_langu = c_lang_e - IMPORTING ex_dateformat = default_excel_date_format ). - CATCH cx_abap_datfm_format_unknown. - - ENDTRY. - - " and fallback to fixed format - IF default_excel_date_format IS INITIAL. - default_excel_date_format = zcl_excel_style_number_format=>c_format_date_ddmmyyyydot. - ENDIF. - - ep_default_excel_date_format = default_excel_date_format. -ENDMETHOD. - - diff --git a/ZA2X/TTYP/ZEXCEL_T_CELL_DATA.slnk b/ZA2X/TTYP/ZEXCEL_T_CELL_DATA.slnk index f25e698..d6638ee 100644 --- a/ZA2X/TTYP/ZEXCEL_T_CELL_DATA.slnk +++ b/ZA2X/TTYP/ZEXCEL_T_CELL_DATA.slnk @@ -1,5 +1,5 @@ - +