diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 727ccee..9e12f7d 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,15 +1,15 @@ - - - + + + class ZCL_EXCEL_WORKSHEET definition public final create public . -public section. *"* public components of class ZCL_EXCEL_WORKSHEET *"* do not include other source files here!!! +public section. type-pools ABAP . interfaces ZIF_EXCEL_SHEET_PROPERTIES . @@ -163,6 +163,8 @@ public section. returning value(EP_SIZE) type I . methods GET_TITLE + importing + !IP_ESCAPED type FLAG default '' returning value(EP_TITLE) type ZEXCEL_SHEET_TITLE . methods SET_CELL @@ -386,45 +388,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. @@ -465,51 +465,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: @@ -2578,13 +2575,12 @@ endmethod. close_document. endmethod. - - - - - - + + + + + method BIND_TABLE. DATA: @@ -2632,6 +2628,8 @@ endmethod. lt_field_catalog = it_field_catalog. ENDIF. + SORT lt_field_catalog BY position. + CREATE OBJECT lo_table. lo_table->settings = ls_settings. lo_table->set_data( ir_data = ip_table ). @@ -2724,9 +2722,8 @@ endmethod. endmethod. - - + method CALCULATE_COLUMN_WIDTHS. TYPES: BEGIN OF t_auto_size, @@ -2787,11 +2784,10 @@ endmethod. ENDIF. endmethod. - - - - + + + method CONSTRUCTOR. DATA: lv_title TYPE zexcel_sheet_title. @@ -2830,21 +2826,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. @@ -2870,10 +2864,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, @@ -2886,13 +2879,12 @@ endmethod. CONCATENATE lv_active_column lv_active_row INTO ep_active_cell. endmethod. - - - - - - + + + + + method GET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -2908,11 +2900,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. @@ -2931,47 +2922,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'. @@ -2995,18 +2980,16 @@ 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. + + + method GET_DIMENSION_RANGE. me->update_dimension_range( ). IF upper_cell EQ lower_cell. "only one cell @@ -3020,73 +3003,64 @@ endmethod. CONCATENATE upper_cell-cell_coords ':' lower_cell-cell_coords INTO ep_dimension_range. ENDIF. -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, @@ -3156,11 +3130,10 @@ endmethod. * ENDIF. endmethod. - - - - + + + method GET_ROW_DIMENSION. FIELD-SYMBOLS: <fs_row_dimension> LIKE LINE OF row_dimensions. @@ -3179,43 +3152,45 @@ 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. - ep_title = me->title. + DATA lv_value TYPE string. + IF ip_escaped EQ abap_true. + lv_value = me->title. + ep_title = zcl_excel_common=>escape_string( lv_value ). + ELSE. + ep_title = me->title. + ENDIF. endmethod. - - - - - - - - + + + + + + + method SET_CELL. DATA: lv_column TYPE zexcel_cell_column, @@ -3308,13 +3283,12 @@ endmethod. ENDIF. endmethod. - - - - - - + + + + + method SET_CELL_STYLE. DATA: lv_column TYPE zexcel_cell_column, @@ -3339,10 +3313,9 @@ endmethod. ENDIF. endmethod. - - - + + method SET_DEFAULT_EXCEL_DATE_FORMAT. IF ip_default_excel_date_format IS INITIAL. @@ -3353,12 +3326,11 @@ endmethod. default_excel_date_format = ip_default_excel_date_format. endmethod. - - - - - + + + + method SET_MERGE. DATA: lv_column_start TYPE zexcel_cell_column, @@ -3388,29 +3360,26 @@ endmethod. INSERT ls_sheet_content INTO TABLE sheet_content_merge. 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, @@ -3466,16 +3435,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, @@ -3514,6 +3481,5 @@ endmethod. CONCATENATE lv_column_alpha lv_row_alpha INTO lower_cell-cell_coords. endmethod. -