diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 76ce257..29517b7 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,7 +1,7 @@ - - - + + + class ZCL_EXCEL_WORKSHEET definition public final @@ -390,45 +390,43 @@ class lcl_gui_alv_grid definition inheriting from cl_gui_alv_grid. endclass. *"* use this source file for any macro definitions you need *"* in the implementation part of the class - - ABAP SLIS SOI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + method ZIF_EXCEL_SHEET_PROPERTIES~GET_STYLE. ep_style = zif_excel_sheet_properties~style. @@ -469,51 +467,48 @@ endmethod. 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: @@ -2582,14 +2577,13 @@ endmethod. close_document. endmethod. - - - - - - - method BIND_TABLE. + + + + + + METHOD bind_table. DATA: lv_row_int TYPE zexcel_cell_row, @@ -2660,7 +2654,17 @@ endmethod. " Due restrinction of new table object we cannot have two column with the same name " Check if a column with the same name exists, if exists add a counter - lv_value = <ls_field_catalog>-scrtext_m. + " If no medium description is provided we try to use small or long +* lv_value = <ls_field_catalog>-scrtext_m. + IF <ls_field_catalog>-scrtext_m IS NOT INITIAL. + lv_value = <ls_field_catalog>-scrtext_m. + ELSEIF <ls_field_catalog>-scrtext_s IS NOT INITIAL. + lv_value = <ls_field_catalog>-scrtext_s. + ELSEIF <ls_field_catalog>-scrtext_l IS NOT INITIAL. + lv_value = <ls_field_catalog>-scrtext_l. + ELSE. + lv_value = 'Column'. " default value as Excel does + ENDIF. WHILE 1 = 1. READ TABLE lt_column_name_buffer TRANSPORTING NO FIELDS WITH KEY table_line = lv_value BINARY SEARCH. IF sy-subrc <> 0. @@ -2729,10 +2733,9 @@ endmethod. es_table_settings-bottom_right_row = ls_settings-top_left_row + lv_rows + 1. "Last rows -endmethod. - +ENDMETHOD. - + method CALCULATE_COLUMN_WIDTHS. TYPES: BEGIN OF t_auto_size, @@ -2793,11 +2796,10 @@ endmethod. ENDIF. endmethod. - - - - + + + method CONSTRUCTOR. DATA: lv_title TYPE zexcel_sheet_title. @@ -2836,21 +2838,19 @@ endmethod. upper_cell-cell_row = 1. upper_cell-cell_column = 1. endmethod. - - + method DELETE_MERGE. DELETE sheet_content_merge INDEX 1. DELETE sheet_content_merge INDEX 1. endmethod. - - - - - + + + + method FREEZE_PANES. data: lv_xsplit type i, lv_ysplit type i. @@ -2876,10 +2876,9 @@ endmethod. freeze_pane_cell_column = ip_num_columns + 1. freeze_pane_cell_row = ip_num_rows + 1. endmethod. - - - + + method GET_ACTIVE_CELL. DATA: lv_active_column TYPE zexcel_cell_column_alpha, @@ -2892,13 +2891,12 @@ endmethod. CONCATENATE lv_active_column lv_active_row INTO ep_active_cell. endmethod. - - - - - - + + + + + method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -2914,11 +2912,10 @@ endmethod. ep_rc = sy-subrc. ep_value = ls_sheet_content-cell_value. endmethod. - - - - + + + method GET_COLUMN_DIMENSION. FIELD-SYMBOLS: <fs_column_dimension> LIKE LINE OF column_dimensions. @@ -2937,47 +2934,41 @@ endmethod. ENDIF. 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'. @@ -3001,17 +2992,15 @@ endmethod. 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( ). @@ -3027,72 +3016,63 @@ endmethod. ENDIF. 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, @@ -3165,11 +3145,10 @@ endmethod. * ENDIF. endmethod. - - - - + + + method GET_ROW_DIMENSION. FIELD-SYMBOLS: <fs_row_dimension> LIKE LINE OF row_dimensions. @@ -3188,32 +3167,28 @@ endmethod. ENDIF. 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. @@ -3223,17 +3198,16 @@ endmethod. ep_title = me->title. ENDIF. endmethod. - - - - - - - - - - METHOD set_cell. + + + + + + + + + method SET_CELL. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content TYPE zexcel_s_cell_data, @@ -3333,13 +3307,12 @@ endmethod. ENDIF. endmethod. - - - - - - + + + + + method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, @@ -3364,10 +3337,9 @@ endmethod. ENDIF. endmethod. - - - + + method SET_DEFAULT_EXCEL_DATE_FORMAT. IF ip_default_excel_date_format IS INITIAL. @@ -3378,14 +3350,13 @@ endmethod. default_excel_date_format = ip_default_excel_date_format. endmethod. - - - - - - - METHOD set_merge. + + + + + + method SET_MERGE. DATA: lv_column_start TYPE zexcel_cell_column, lv_column_end TYPE zexcel_cell_column, @@ -3419,30 +3390,27 @@ endmethod. CONCATENATE ip_column_end lv_row_alpha INTO ls_sheet_content-cell_coords. INSERT ls_sheet_content INTO TABLE sheet_content_merge. -ENDMETHOD. - +endmethod. - - + + method SET_PRINT_GRIDLINES. me->print_gridlines = i_print_gridlines. endmethod. - - - + + method SET_SHOW_GRIDLINES. me->show_gridlines = i_show_gridlines. endmethod. - - - - - - - - + + + + + + + method SET_TABLE. DATA: lo_tabdescr TYPE REF TO cl_abap_structdescr, @@ -3498,16 +3466,14 @@ endmethod. ENDLOOP. endmethod. - - - + + method SET_TITLE. me->title = ip_title. endmethod. - - + method UPDATE_DIMENSION_RANGE. DATA: ls_sheet_content TYPE zexcel_s_cell_data, @@ -3546,6 +3512,5 @@ endmethod. CONCATENATE lv_column_alpha lv_row_alpha INTO lower_cell-cell_coords. endmethod. -