diff --git a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk index 0240e00..e1b08c1 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_WORKSHEET.slnk @@ -1,9 +1,9 @@ - - - - + + + + *"* local class implementation for public class *"* use this source file for the implementation part of *"* local helper classes @@ -159,10 +159,16 @@ ENDCLASS. "lcl_gui_alv_grid DEFINITION *"* use this source file for any macro definitions you need *"* in the implementation part of the class + + + + + + - - + + @@ -173,6 +179,15 @@ ENDCLASS. "lcl_gui_alv_grid DEFINITION + + + + + + + + + @@ -217,7 +232,7 @@ ENDCLASS. "lcl_gui_alv_grid DEFINITION - METHOD zif_excel_sheet_printsettings~clear_print_repeat_columns. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_COLUMNS. *--------------------------------------------------------------------* * adjust internal representation @@ -232,10 +247,10 @@ ENDCLASS. "lcl_gui_alv_grid DEFINITION me->print_title_set_range( ). -ENDMETHOD. + endmethod. - METHOD zif_excel_sheet_printsettings~clear_print_repeat_rows. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~CLEAR_PRINT_REPEAT_ROWS. *--------------------------------------------------------------------* * adjust internal representation @@ -250,25 +265,25 @@ ENDMETHOD. me->print_title_set_range( ). -ENDMETHOD. + endmethod. - METHOD zif_excel_sheet_printsettings~get_print_repeat_columns. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_COLUMNS. ev_columns_from = me->print_title_col_from. ev_columns_to = me->print_title_col_to. -ENDMETHOD. + endmethod. - METHOD zif_excel_sheet_printsettings~get_print_repeat_rows. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~GET_PRINT_REPEAT_ROWS. ev_rows_from = me->print_title_row_from. ev_rows_to = me->print_title_row_to. -ENDMETHOD. + endmethod. - METHOD zif_excel_sheet_printsettings~set_print_repeat_columns. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_COLUMNS. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns -* - Stefan Schmöcker, 2012-12-02 +* - Stefan Schmöcker, 2012-12-02 *--------------------------------------------------------------------* DATA: lv_col_from_int TYPE i, @@ -311,13 +326,13 @@ ENDMETHOD. *--------------------------------------------------------------------* me->print_title_set_range( ). -ENDMETHOD. + endmethod. - METHOD zif_excel_sheet_printsettings~set_print_repeat_rows. + method ZIF_EXCEL_SHEET_PRINTSETTINGS~SET_PRINT_REPEAT_ROWS. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns -* - Stefan Schmöcker, 2012-12-02 +* - Stefan Schmöcker, 2012-12-02 *--------------------------------------------------------------------* DATA: lv_errormessage TYPE string. @@ -357,7 +372,7 @@ ENDMETHOD. me->print_title_set_range( ). -ENDMETHOD. + endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~GET_STYLE. @@ -366,7 +381,7 @@ ENDMETHOD. ELSE. ep_style = me->excel->get_default_style( ). ENDIF. -endmethod. + endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~INITIALIZE. @@ -380,12 +395,12 @@ endmethod. ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_normal = 100. ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_pagelayoutview = 100 . ZIF_EXCEL_SHEET_PROPERTIES~zoomscale_sheetlayoutview = 100 . -endmethod. + endmethod. method ZIF_EXCEL_SHEET_PROPERTIES~SET_STYLE. zif_excel_sheet_properties~style = ip_style. -endmethod. + endmethod. method ZIF_EXCEL_SHEET_PROTECTION~INITIALIZE. @@ -411,17 +426,17 @@ endmethod. me->zif_excel_sheet_protection~sheet = zif_excel_sheet_protection=>c_noactive. me->zif_excel_sheet_protection~sort = zif_excel_sheet_protection=>c_noactive. -endmethod. + endmethod. method ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME. me->zif_excel_sheet_vba_project~codename = ip_codename. -endmethod. + endmethod. method ZIF_EXCEL_SHEET_VBA_PROJECT~SET_CODENAME_PR. me->zif_excel_sheet_vba_project~codename_pr = ip_codename_pr. -endmethod. + endmethod. @@ -432,7 +447,7 @@ endmethod. WHEN zcl_excel_drawing=>type_chart. charts->include( ip_drawing ). ENDCASE. -endmethod. + endmethod. @@ -440,7 +455,7 @@ endmethod. CREATE OBJECT eo_conditional_style. conditional_styles->add( eo_conditional_style ). -endmethod. + endmethod. @@ -448,7 +463,7 @@ endmethod. CREATE OBJECT eo_data_validation. data_validations->add( eo_data_validation ). -endmethod. + endmethod. @@ -456,7 +471,7 @@ endmethod. * Create default blank range CREATE OBJECT eo_range. ranges->add( eo_range ). -endmethod. + endmethod. @@ -485,7 +500,7 @@ endmethod. catch zcx_excel . endtry. -endmethod. + endmethod. @@ -2076,8 +2091,8 @@ endmethod. set country space. * Hier wird nur die korrekte Kommaseparatierung gemacht, wenn die * Zeichen einer -* Zahl enthalten sind. Das ist f#ƒÂ#r Timestamps, die auch ":" enthalten. -* F#ƒÂ#r die +* Zahl enthalten sind. Das ist f#ƒÂ#r Timestamps, die auch ":" enthalten. +* F#ƒÂ#r die * darf keine Kommaseparierung stattfinden. * Changing for correction request - Y6BK041073 if contentsitem-value co '0123456789.,-+E '. @@ -2574,7 +2589,7 @@ endmethod. li_document_size. close_document. -endmethod. + endmethod. @@ -2582,10 +2597,10 @@ endmethod. - METHOD bind_table. + method BIND_TABLE. *--------------------------------------------------------------------* * issue #230 - Pimp my Code -* - Stefan Schmöcker, (wi p) 2012-12-01 +* - Stefan Schmöcker, (wi p) 2012-12-01 * - ... * aligning code * message made to support multilinguality @@ -2840,7 +2855,7 @@ endmethod. ENDIF. " << Issue #291 -ENDMETHOD. + endmethod. @@ -2869,7 +2884,7 @@ ENDMETHOD. ep_width = ep_width * stylemapping-complete_style-font-size / 11. ENDIF. -endmethod. + endmethod. @@ -2927,7 +2942,7 @@ endmethod. * ). * " For an easy start we just take the number of characters as the width * width = strlen( cell_value ). -* " Addition to solve issue #120, contribution by Stefan Schm#ƒÂ#cker +* " Addition to solve issue #120, contribution by Stefan Schm#ƒÂ#cker * " Calculate width using Font Size and Font Type * IF cell_style IS BOUND * AND cell_style->font IS BOUND. @@ -2948,7 +2963,7 @@ endmethod. ENDLOOP. ENDIF. -endmethod. + endmethod. @@ -3051,7 +3066,7 @@ endmethod. - method CHANGE_CELL_STYLE. + METHOD change_cell_style. " issue # 139 DATA: stylemapping TYPE zexcel_s_stylemapping, @@ -3227,15 +3242,15 @@ endmethod. ENDIF. IF ip_protection IS SUPPLIED. - MOVE-CORRESPONDING ip_alignment TO complete_style-alignment. + MOVE-CORRESPONDING ip_protection TO complete_style-protection. IF ip_xprotection IS SUPPLIED. MOVE-CORRESPONDING ip_xprotection TO complete_stylex-protection. ELSE. IF ip_protection-hidden IS NOT INITIAL. - complete_style-protection-hidden = 'X'. + complete_stylex-protection-hidden = 'X'. ENDIF. IF ip_protection-locked IS NOT INITIAL. - complete_style-protection-locked = 'X'. + complete_stylex-protection-locked = 'X'. ENDIF. ENDIF. ENDIF. @@ -3347,7 +3362,7 @@ endmethod. ip_row = ip_row ip_style = ep_guid ). -endmethod. +ENDMETHOD. @@ -3396,7 +3411,7 @@ endmethod. upper_cell-cell_row = 1. upper_cell-cell_column = 1. -endmethod. + endmethod. method DELETE_MERGE. @@ -3404,7 +3419,7 @@ endmethod. DELETE sheet_content_merge INDEX 1. DELETE sheet_content_merge INDEX 1. -endmethod. + endmethod. @@ -3434,7 +3449,7 @@ endmethod. freeze_pane_cell_column = ip_num_columns + 1. freeze_pane_cell_row = ip_num_rows + 1. -endmethod. + endmethod. @@ -3469,7 +3484,7 @@ endmethod. ADD 1 TO sheetnumber. ENDDO. -endmethod. + endmethod. @@ -3485,7 +3500,7 @@ endmethod. SHIFT lv_active_row LEFT DELETING LEADING space. CONCATENATE lv_active_column lv_active_row INTO ep_active_cell. -endmethod. + endmethod. @@ -3511,7 +3526,7 @@ endmethod. ep_value = ls_sheet_content-cell_value. ep_guid = ls_sheet_content-cell_style. " issue 139 - added this to be used for columnwidth calculation - " Addition to solve issue #120, contribution by Stefan Schm#ƒÂ#cker + " Addition to solve issue #120, contribution by Stefan Schm#ƒÂ#cker DATA: style_iterator TYPE REF TO cl_object_collection_iterator, style TYPE REF TO zcl_excel_style. IF ep_style IS REQUESTED. @@ -3524,7 +3539,7 @@ endmethod. ENDIF. ENDWHILE. ENDIF. -endmethod. + endmethod. @@ -3551,33 +3566,33 @@ endmethod. r_column_dimension = <fs_column_dimension>-column_dimension. ENDIF. -endmethod. + endmethod. method GET_COLUMN_DIMENSIONS. r_column_dimension[] = me->column_dimensions[]. -endmethod. + endmethod. method GET_COND_STYLES_ITERATOR. eo_iterator = me->conditional_styles->get_iterator( ). -endmethod. + endmethod. method GET_DATA_VALIDATIONS_ITERATOR. eo_iterator = me->data_validations->get_iterator( ). -endmethod. + endmethod. method GET_DATA_VALIDATIONS_SIZE. ep_size = me->data_validations->size( ). -endmethod. + endmethod. @@ -3591,7 +3606,7 @@ endmethod. ENDIF. r_column_dimension = me->default_column_dimension. -endmethod. + endmethod. @@ -3617,7 +3632,7 @@ endmethod. ENDIF. ep_default_excel_date_format = default_excel_date_format. -endmethod. + endmethod. @@ -3653,7 +3668,7 @@ endmethod. ENDCASE. ep_default_excel_time_format = default_excel_time_format. -endmethod. + endmethod. @@ -3663,7 +3678,7 @@ endmethod. ENDIF. r_row_dimension = me->default_row_dimension. -endmethod. + endmethod. @@ -3683,7 +3698,7 @@ endmethod. CONCATENATE upper_cell-cell_coords ':' lower_cell-cell_coords INTO ep_dimension_range. ENDIF. -endmethod. + endmethod. @@ -3715,7 +3730,7 @@ endmethod. ENDWHILE. WHEN OTHERS. ENDCASE. -endmethod. + endmethod. @@ -3727,7 +3742,7 @@ endmethod. WHEN zcl_excel_drawing=>type_chart. eo_iterator = charts->get_iterator( ). ENDCASE. -endmethod. + endmethod. @@ -3735,7 +3750,7 @@ endmethod. method GET_FREEZE_CELL. ep_row = me->freeze_pane_cell_row. ep_column = me->freeze_pane_cell_column. -endmethod. + endmethod. @@ -3743,7 +3758,7 @@ endmethod. ep_guid = me->guid. -endmethod. + endmethod. @@ -3751,7 +3766,7 @@ endmethod. method GET_HIGHEST_COLUMN. me->update_dimension_range( ). r_highest_column = me->lower_cell-cell_column. -endmethod. + endmethod. @@ -3759,19 +3774,19 @@ endmethod. method GET_HIGHEST_ROW. me->update_dimension_range( ). r_highest_row = me->lower_cell-cell_row. -endmethod. + endmethod. method GET_HYPERLINKS_ITERATOR. eo_iterator = hyperlinks->get_iterator( ). -endmethod. + endmethod. method GET_HYPERLINKS_SIZE. ep_size = hyperlinks->size( ). -endmethod. + endmethod. @@ -3847,7 +3862,7 @@ endmethod. * SEPARATED BY ':'. * ENDIF. -endmethod. + endmethod. @@ -3855,7 +3870,7 @@ endmethod. eo_iterator = me->ranges->get_iterator( ). -endmethod. + endmethod. @@ -3877,31 +3892,31 @@ endmethod. r_row_dimension = <fs_row_dimension>-row_dimension. ENDIF. -endmethod. + endmethod. method GET_ROW_DIMENSIONS. r_row_dimension[] = me->row_dimensions[]. -endmethod. + endmethod. method GET_TABCOLOR. ev_tabcolor = me->tabcolor. -endmethod. + endmethod. method GET_TABLES_ITERATOR. eo_iterator = tables->if_object_collection~get_iterator( ). -endmethod. + endmethod. method GET_TABLES_SIZE. ep_size = tables->if_object_collection~size( ). -endmethod. + endmethod. @@ -3914,7 +3929,7 @@ endmethod. ELSE. ep_title = me->title. ENDIF. -endmethod. + endmethod. @@ -3971,13 +3986,13 @@ endmethod. ENDIF. ENDIF. -endmethod. + endmethod. method PRINT_TITLE_SET_RANGE. *--------------------------------------------------------------------* * issue#235 - repeat rows/columns -* - Stefan Schmöcker, 2012-12-02 +* - Stefan Schmöcker, 2012-12-02 *--------------------------------------------------------------------* @@ -4070,7 +4085,7 @@ endmethod. -endmethod. + endmethod. @@ -4112,7 +4127,7 @@ endmethod. * Begin of change issue #152 - don't touch exisiting style if only value is passed * lv_style_guid = ip_style. lv_column = zcl_excel_common=>convert_column2int( ip_column ). - READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH TABLE KEY cell_row = ip_row " Changed to access via table key , Stefan Schmöcker, 2013-08-03 + READ TABLE sheet_content ASSIGNING <fs_sheet_content> WITH TABLE KEY cell_row = ip_row " Changed to access via table key , Stefan Schmöcker, 2013-08-03 cell_column = lv_column. IF sy-subrc = 0. IF ip_style IS INITIAL. @@ -4306,14 +4321,14 @@ endmethod. ENDIF. * End of Fix issue #162 -endmethod. + endmethod. - METHOD set_cell_formula. + method SET_CELL_FORMULA. DATA: lv_column TYPE zexcel_cell_column, ls_sheet_content LIKE LINE OF me->sheet_content. @@ -4340,7 +4355,7 @@ endmethod. <sheet_content>-cell_formula = ip_formula. -ENDMETHOD. + endmethod. @@ -4370,7 +4385,7 @@ ENDMETHOD. set_cell( ip_column = ip_column ip_row = ip_row ip_value = '' ip_style = ip_style ). ENDIF. -endmethod. + endmethod. @@ -4406,7 +4421,7 @@ endmethod. column_dimension->set_auto_size( ip_width_autosize ). -endmethod. + endmethod. @@ -4420,7 +4435,7 @@ endmethod. ENDIF. default_excel_date_format = ip_default_excel_date_format. -endmethod. + endmethod. @@ -4462,13 +4477,13 @@ 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. + endmethod. @@ -4499,25 +4514,25 @@ endmethod. -endmethod. + endmethod. method SET_SHOW_GRIDLINES. me->show_gridlines = i_show_gridlines. -endmethod. + endmethod. method SET_SHOW_ROWCOLHEADERS. me->show_rowcolheaders = i_show_rowcolheaders. -endmethod. + endmethod. method SET_TABCOLOR. me->tabcolor = iv_tabcolor. -endmethod. + endmethod. @@ -4601,7 +4616,7 @@ endmethod. ENDIF. ENDLOOP. -endmethod. + endmethod. @@ -4609,20 +4624,20 @@ endmethod. method SET_TITLE. *--------------------------------------------------------------------* * ToDos: -* 2do§1 The current coding for replacing a named ranges name +* 2do§1 The current coding for replacing a named ranges name * after renaming a sheet should be checked if it is * really working if sheetname should be escaped *--------------------------------------------------------------------* *--------------------------------------------------------------------* * issue #230 - Pimp my Code -* - Stefan Schmöcker, (wip ) 2012-12-08 +* - Stefan Schmöcker, (wip ) 2012-12-08 * - ... * changes: aligning code * message made to support multilinguality *--------------------------------------------------------------------* * issue#243 - ' is not allowed as first character in sheet title -* - Stefan Schmöcker, 2012-12-02 +* - Stefan Schmöcker, 2012-12-02 * changes: added additional check for ' as first character *--------------------------------------------------------------------* DATA: lo_worksheets_iterator TYPE REF TO cl_object_collection_iterator, @@ -4685,7 +4700,7 @@ endmethod. * After changing this worksheet's title we have to adjust * all ranges that are referring to this worksheet. *--------------------------------------------------------------------* -* 2do§1 - Check if the following quickfix is solid +* 2do§1 - Check if the following quickfix is solid * I fear it isn't - but this implementation is better then * nothing at all since it handles a supposed majority of cases *--------------------------------------------------------------------* @@ -4704,7 +4719,7 @@ endmethod. ENDWHILE. -endmethod. + endmethod. @@ -4747,6 +4762,6 @@ endmethod. SHIFT lv_row_alpha LEFT DELETING LEADING space. CONCATENATE lv_column_alpha lv_row_alpha INTO lower_cell-cell_coords. -endmethod. + endmethod.