diff --git a/abaplint.json b/abaplint.json index 2ba0307..868ab71 100644 --- a/abaplint.json +++ b/abaplint.json @@ -152,7 +152,9 @@ "allowExit": false }, "line_only_punc": false, - "obsolete_statement": false, + "obsolete_statement": { + "move": true + }, "start_at_tab": false, "whitespace_end": true, "exporting": false, diff --git a/src/demos/zdemo_excel40.prog.abap b/src/demos/zdemo_excel40.prog.abap index 0c3f3be..54bf595 100644 --- a/src/demos/zdemo_excel40.prog.abap +++ b/src/demos/zdemo_excel40.prog.abap @@ -1,8 +1,9 @@ REPORT zdemo_excel40. -DATA: lo_excel TYPE REF TO zcl_excel, - lo_worksheet TYPE REF TO zcl_excel_worksheet. +DATA: lo_excel TYPE REF TO zcl_excel, + lo_worksheet TYPE REF TO zcl_excel_worksheet, + lo_style_changer TYPE REF TO zif_excel_style_changer. DATA: lv_row TYPE zexcel_cell_row, lv_col TYPE i, @@ -29,41 +30,32 @@ START-OF-SELECTION. * - first 3 rows will have fontcolor set * These marked cells will be used for repeatable rows/columns on printpages *--------------------------------------------------------------------* - DO 100 TIMES. " Rows + lo_worksheet->set_area( + ip_column_start = 1 + ip_column_end = 20 + ip_row = 1 + ip_row_to = 100 + ip_formula = 'CHAR(64+COLUMN())&TEXT(ROW(),"????????0")' + ip_area = lo_worksheet->c_area-whole ). - lv_row = sy-index . - WRITE lv_row TO lv_row_char. - - DO 20 TIMES. - - lv_col = sy-index - 1. - CONCATENATE sy-abcde+lv_col(1) lv_row_char INTO lv_value. - lv_col = sy-index. - lo_worksheet->set_cell( ip_row = lv_row - ip_column = lv_col - ip_value = lv_value ). - - TRY. - IF lv_row <= 3. - lo_worksheet->change_cell_style( ip_column = lv_col - ip_row = lv_row - ip_fill_filltype = zcl_excel_style_fill=>c_fill_solid - ip_fill_fgcolor_rgb = zcl_excel_style_color=>c_yellow ). - ENDIF. - IF lv_col <= 4. - lo_worksheet->change_cell_style( ip_column = lv_col - ip_row = lv_row - ip_font_color_rgb = zcl_excel_style_color=>c_red ). - ENDIF. - CATCH zcx_excel . - ENDTRY. - - ENDDO. - - - - ENDDO. + lo_style_changer = zcl_excel_style_changer=>create( lo_excel ). + lo_style_changer->set_fill_filltype( zcl_excel_style_fill=>c_fill_solid ). + lo_style_changer->set_fill_fgcolor_rgb( zcl_excel_style_color=>c_yellow ). + lo_worksheet->change_area_style( + ip_column_start = 1 + ip_column_end = 20 + ip_row = 1 + ip_row_to = 3 + ip_style_changer = lo_style_changer ). + lo_style_changer = zcl_excel_style_changer=>create( lo_excel ). + lo_style_changer->set_font_color_rgb( zcl_excel_style_color=>c_red ). + lo_worksheet->change_area_style( + ip_column_start = 1 + ip_column_end = 4 + ip_row = 1 + ip_row_to = 100 + ip_style_changer = lo_style_changer ). *--------------------------------------------------------------------* * Printsettings diff --git a/src/demos/zdemo_excel40.prog.xml b/src/demos/zdemo_excel40.prog.xml index 4242d2e..d9e5dff 100644 --- a/src/demos/zdemo_excel40.prog.xml +++ b/src/demos/zdemo_excel40.prog.xml @@ -13,8 +13,8 @@ R - abap2xlsx Demo: Print settings - 30 + abap2xlsx Demo: Area and Print settings + 39 S diff --git a/src/not_cloud/zcl_excel_ole.clas.abap b/src/not_cloud/zcl_excel_ole.clas.abap index 1a02354..b97e571 100644 --- a/src/not_cloud/zcl_excel_ole.clas.abap +++ b/src/not_cloud/zcl_excel_ole.clas.abap @@ -1325,13 +1325,13 @@ CLASS zcl_excel_ole IMPLEMENTATION. contentsitem-row = realoverflow. IF sy-subrc = 0. - MOVE semaitem-col_ops TO search_item(3). + search_item(3) = semaitem-col_ops. SEARCH 'ADD#CNT#MIN#MAX#AVG#NOP#DFT#' FOR search_item. IF sy-subrc NE 0. RAISE error_in_sema. ENDIF. - MOVE semaitem-col_typ TO search_item(3). + search_item(3) = semaitem-col_typ. SEARCH 'NUM#N00#N01#N02#N03#N04#PCT#DAT#MON#STR#' FOR search_item. IF sy-subrc NE 0. @@ -1382,7 +1382,7 @@ CLASS zcl_excel_ole IMPLEMENTATION. CLEAR contentsitem-value. ENDIF. ELSE. - MOVE TO contentsitem-value. + contentsitem-value = . ENDIF. ELSEIF semaitem-col_typ EQ 'NUM' OR semaitem-col_typ EQ 'N00' OR @@ -1758,7 +1758,7 @@ CLASS zcl_excel_ole IMPLEMENTATION. IF curritem-left EQ curritem2-left. length = curritem-top + curritem-rows. IF length EQ curritem2-top AND curritem-decimals EQ curritem2-decimals. - MOVE curritem TO curritem3. + curritem3 = curritem. curritem3-rows = curritem3-rows + curritem2-rows. curritem-left = -1. MODIFY currcells INDEX sy-index FROM curritem. @@ -1794,7 +1794,7 @@ CLASS zcl_excel_ole IMPLEMENTATION. curritem2-rows. length = curritem-left + curritem-columns. IF length EQ curritem2-left AND curritem-decimals EQ curritem2-decimals. - MOVE curritem TO curritem3. + curritem3 = curritem. curritem3-columns = curritem3-columns + curritem2-columns. curritem-left = -1. MODIFY currcells INDEX sy-index FROM curritem. diff --git a/src/zcl_excel_columns.clas.abap b/src/zcl_excel_columns.clas.abap index 3ada97c..06cfd48 100644 --- a/src/zcl_excel_columns.clas.abap +++ b/src/zcl_excel_columns.clas.abap @@ -6,13 +6,6 @@ CLASS zcl_excel_columns DEFINITION *"* public components of class ZCL_EXCEL_COLUMNS *"* do not include other source files here!!! PUBLIC SECTION. - TYPES: - BEGIN OF mty_s_hashed_column, - column_index TYPE int4, - column TYPE REF TO zcl_excel_column, - END OF mty_s_hashed_column , - mty_ts_hasehd_column TYPE HASHED TABLE OF mty_s_hashed_column WITH UNIQUE KEY column_index. - METHODS add IMPORTING !io_column TYPE REF TO zcl_excel_column . @@ -41,9 +34,15 @@ CLASS zcl_excel_columns DEFINITION *"* private components of class ZABAP_EXCEL_RANGES *"* do not include other source files here!!! PRIVATE SECTION. + TYPES: + BEGIN OF mty_s_hashed_column, + column_index TYPE int4, + column TYPE REF TO zcl_excel_column, + END OF mty_s_hashed_column , + mty_ts_hashed_column TYPE HASHED TABLE OF mty_s_hashed_column WITH UNIQUE KEY column_index. DATA columns TYPE REF TO cl_object_collection . - DATA columns_hasehd TYPE mty_ts_hasehd_column . + DATA columns_hashed TYPE mty_ts_hashed_column . ENDCLASS. @@ -57,14 +56,14 @@ CLASS zcl_excel_columns IMPLEMENTATION. ls_hashed_column-column_index = io_column->get_column_index( ). ls_hashed_column-column = io_column. - INSERT ls_hashed_column INTO TABLE columns_hasehd . + INSERT ls_hashed_column INTO TABLE columns_hashed . columns->add( io_column ). ENDMETHOD. METHOD clear. - CLEAR columns_hasehd. + CLEAR columns_hashed. columns->clear( ). ENDMETHOD. @@ -79,7 +78,7 @@ CLASS zcl_excel_columns IMPLEMENTATION. METHOD get. FIELD-SYMBOLS: TYPE mty_s_hashed_column. - READ TABLE columns_hasehd WITH KEY column_index = ip_index ASSIGNING . + READ TABLE columns_hashed WITH KEY column_index = ip_index ASSIGNING . IF sy-subrc = 0. eo_column = -column. ENDIF. @@ -97,7 +96,7 @@ CLASS zcl_excel_columns IMPLEMENTATION. METHOD remove. - DELETE TABLE columns_hasehd WITH TABLE KEY column_index = io_column->get_column_index( ) . + DELETE TABLE columns_hashed WITH TABLE KEY column_index = io_column->get_column_index( ) . columns->remove( io_column ). ENDMETHOD. diff --git a/src/zcl_excel_common.clas.abap b/src/zcl_excel_common.clas.abap index 6ae1159..f035070 100644 --- a/src/zcl_excel_common.clas.abap +++ b/src/zcl_excel_common.clas.abap @@ -1261,7 +1261,7 @@ CLASS zcl_excel_common IMPLEMENTATION. * Capture reference cell address *--------------------------------------------------------------------* TRY. - MOVE: lv_ref_formula+lv_offset1(lv_tlen) TO lv_ref_cell_addr. "Ref cell address + lv_ref_cell_addr = lv_ref_formula+lv_offset1(lv_tlen). "Ref cell address CATCH cx_root. lv_errormessage = 'Internal error in Class ZCL_EXCEL_COMMON Method SHIFT_FORMULA Spot 1 '. " Change to messageclass if possible zcx_excel=>raise_text( lv_errormessage ). @@ -1445,7 +1445,7 @@ CLASS zcl_excel_common IMPLEMENTATION. * Return resulting formula *--------------------------------------------------------------------* IF lv_cur_form IS NOT INITIAL. - MOVE lv_cur_form TO ev_resulting_formula. + ev_resulting_formula = lv_cur_form. ENDIF. ENDMETHOD. diff --git a/src/zcl_excel_converter.clas.abap b/src/zcl_excel_converter.clas.abap index 2dff15a..4fa17c8 100644 --- a/src/zcl_excel_converter.clas.abap +++ b/src/zcl_excel_converter.clas.abap @@ -163,28 +163,28 @@ CLASS zcl_excel_converter DEFINITION METHODS create_style_normal IMPORTING !i_alignment TYPE zexcel_alignment OPTIONAL - !i_inttype TYPE inttype OPTIONAL + !i_inttype TYPE abap_typekind OPTIONAL !i_decimals TYPE int1 OPTIONAL RETURNING VALUE(ro_style) TYPE REF TO zcl_excel_style . METHODS create_style_stripped IMPORTING !i_alignment TYPE zexcel_alignment OPTIONAL - !i_inttype TYPE inttype OPTIONAL + !i_inttype TYPE abap_typekind OPTIONAL !i_decimals TYPE int1 OPTIONAL RETURNING VALUE(ro_style) TYPE REF TO zcl_excel_style . METHODS create_style_subtotal IMPORTING !i_alignment TYPE zexcel_alignment OPTIONAL - !i_inttype TYPE inttype OPTIONAL + !i_inttype TYPE abap_typekind OPTIONAL !i_decimals TYPE int1 OPTIONAL RETURNING VALUE(ro_style) TYPE REF TO zcl_excel_style . METHODS create_style_total IMPORTING !i_alignment TYPE zexcel_alignment OPTIONAL - !i_inttype TYPE inttype OPTIONAL + !i_inttype TYPE abap_typekind OPTIONAL !i_decimals TYPE int1 OPTIONAL RETURNING VALUE(ro_style) TYPE REF TO zcl_excel_style . @@ -223,7 +223,7 @@ CLASS zcl_excel_converter DEFINITION IMPORTING !i_type TYPE ty_style_type !i_alignment TYPE zexcel_alignment DEFAULT space - !i_inttype TYPE inttype DEFAULT space + !i_inttype TYPE abap_typekind DEFAULT space !i_decimals TYPE int1 DEFAULT 0 RETURNING VALUE(r_style) TYPE zexcel_cell_style . @@ -246,7 +246,7 @@ CLASS zcl_excel_converter DEFINITION METHODS set_autofilter_area . METHODS set_cell_format IMPORTING - !i_inttype TYPE inttype + !i_inttype TYPE abap_typekind !i_decimals TYPE int1 RETURNING VALUE(r_format) TYPE zexcel_number_format . @@ -836,7 +836,7 @@ CLASS zcl_excel_converter IMPLEMENTATION. CLEAR l_func. ENDCASE. - MOVE i_value TO l_string. + l_string = i_value. CONCATENATE l_string l_func INTO r_text SEPARATED BY space. diff --git a/src/zcl_excel_converter.clas.locals_def.abap b/src/zcl_excel_converter.clas.locals_def.abap index 8182f43..b632a51 100644 --- a/src/zcl_excel_converter.clas.locals_def.abap +++ b/src/zcl_excel_converter.clas.locals_def.abap @@ -31,7 +31,7 @@ TYPES: BEGIN OF ts_subtotal_rows, TYPES: BEGIN OF ts_styles, type TYPE ty_style_type, alignment TYPE zexcel_alignment, - inttype TYPE inttype, + inttype TYPE abap_typekind, decimals TYPE int1, style TYPE REF TO zcl_excel_style, guid TYPE zexcel_cell_style, diff --git a/src/zcl_excel_reader_2007.clas.abap b/src/zcl_excel_reader_2007.clas.abap index 4307e24..48154b3 100644 --- a/src/zcl_excel_reader_2007.clas.abap +++ b/src/zcl_excel_reader_2007.clas.abap @@ -3806,7 +3806,7 @@ CLASS zcl_excel_reader_2007 IMPLEMENTATION. lv_actual_length_line TYPE i, lv_errormessage TYPE string. - MOVE i_filename TO lv_filename. + lv_filename = i_filename. DESCRIBE FIELD ls_binary_data LENGTH lv_max_length_line IN BYTE MODE. OPEN DATASET lv_filename FOR INPUT IN BINARY MODE. @@ -3843,7 +3843,7 @@ CLASS zcl_excel_reader_2007 IMPLEMENTATION. lv_filename TYPE string, lv_errormessage TYPE string. - MOVE i_filename TO lv_filename. + lv_filename = i_filename. cl_gui_frontend_services=>gui_upload( EXPORTING filename = lv_filename diff --git a/src/zcl_excel_rows.clas.abap b/src/zcl_excel_rows.clas.abap index 28f6938..92692b1 100644 --- a/src/zcl_excel_rows.clas.abap +++ b/src/zcl_excel_rows.clas.abap @@ -13,13 +13,6 @@ CLASS zcl_excel_rows DEFINITION *"* protected components of class ZABAP_EXCEL_WORKSHEETS *"* do not include other source files here!!! PUBLIC SECTION. - TYPES: - BEGIN OF mty_s_hashed_row, - row_index TYPE int4, - row TYPE REF TO zcl_excel_row, - END OF mty_s_hashed_row , - mty_ts_hasehd_row TYPE HASHED TABLE OF mty_s_hashed_row WITH UNIQUE KEY row_index. - METHODS add IMPORTING !io_row TYPE REF TO zcl_excel_row . @@ -52,9 +45,15 @@ CLASS zcl_excel_rows DEFINITION *"* private components of class ZABAP_EXCEL_RANGES *"* do not include other source files here!!! PRIVATE SECTION. + TYPES: + BEGIN OF mty_s_hashed_row, + row_index TYPE int4, + row TYPE REF TO zcl_excel_row, + END OF mty_s_hashed_row , + mty_ts_hashed_row TYPE HASHED TABLE OF mty_s_hashed_row WITH UNIQUE KEY row_index. DATA rows TYPE REF TO cl_object_collection . - DATA rows_hasehd TYPE mty_ts_hasehd_row . + DATA rows_hashed TYPE mty_ts_hashed_row . ENDCLASS. @@ -69,14 +68,14 @@ CLASS zcl_excel_rows IMPLEMENTATION. ls_hashed_row-row_index = io_row->get_row_index( ). ls_hashed_row-row = io_row. - INSERT ls_hashed_row INTO TABLE rows_hasehd. + INSERT ls_hashed_row INTO TABLE rows_hashed. rows->add( io_row ). ENDMETHOD. "ADD METHOD clear. - CLEAR rows_hasehd. + CLEAR rows_hashed. rows->clear( ). ENDMETHOD. "CLEAR @@ -91,7 +90,7 @@ CLASS zcl_excel_rows IMPLEMENTATION. METHOD get. FIELD-SYMBOLS: TYPE mty_s_hashed_row. - READ TABLE rows_hasehd WITH KEY row_index = ip_index ASSIGNING . + READ TABLE rows_hashed WITH KEY row_index = ip_index ASSIGNING . IF sy-subrc = 0. eo_row = -row. ENDIF. @@ -109,7 +108,7 @@ CLASS zcl_excel_rows IMPLEMENTATION. METHOD remove. - DELETE TABLE rows_hasehd WITH TABLE KEY row_index = io_row->get_row_index( ) . + DELETE TABLE rows_hashed WITH TABLE KEY row_index = io_row->get_row_index( ) . rows->remove( io_row ). ENDMETHOD. "REMOVE @@ -121,7 +120,7 @@ CLASS zcl_excel_rows IMPLEMENTATION. METHOD get_min_index. FIELD-SYMBOLS: TYPE mty_s_hashed_row. - LOOP AT rows_hasehd ASSIGNING . + LOOP AT rows_hashed ASSIGNING . IF ep_index = 0 OR -row_index < ep_index. ep_index = -row_index. ENDIF. @@ -131,7 +130,7 @@ CLASS zcl_excel_rows IMPLEMENTATION. METHOD get_max_index. FIELD-SYMBOLS: TYPE mty_s_hashed_row. - LOOP AT rows_hasehd ASSIGNING . + LOOP AT rows_hashed ASSIGNING . IF -row_index > ep_index. ep_index = -row_index. ENDIF. diff --git a/src/zcl_excel_style_changer.clas.abap b/src/zcl_excel_style_changer.clas.abap index 22bcfd0..1373c67 100644 --- a/src/zcl_excel_style_changer.clas.abap +++ b/src/zcl_excel_style_changer.clas.abap @@ -574,10 +574,10 @@ CLASS zcl_excel_style_changer IMPLEMENTATION. fontx = ip_xfont. ELSE. * Only supplied values should be used - exception: Flags bold and italic strikethrough underline - MOVE 'X' TO: fontx-bold, - fontx-italic, - fontx-strikethrough, - fontx-underline_mode. + fontx-bold = 'X'. + fontx-italic = 'X'. + fontx-strikethrough = 'X'. + fontx-underline_mode = 'X'. CLEAR fontx-color WITH 'X'. clear_initial_colorxfields( EXPORTING diff --git a/src/zcl_excel_worksheet.clas.abap b/src/zcl_excel_worksheet.clas.abap index b5ada1f..9878bdc 100644 --- a/src/zcl_excel_worksheet.clas.abap +++ b/src/zcl_excel_worksheet.clas.abap @@ -176,6 +176,15 @@ CLASS zcl_excel_worksheet DEFINITION METHODS calculate_column_widths RAISING zcx_excel . + METHODS change_area_style + IMPORTING + !ip_column_start TYPE simple + !ip_column_end TYPE simple OPTIONAL + !ip_row TYPE zexcel_cell_row + !ip_row_to TYPE zexcel_cell_row OPTIONAL + !ip_style_changer TYPE REF TO zif_excel_style_changer + RAISING + zcx_excel. METHODS change_cell_style IMPORTING !ip_column TYPE simple @@ -1387,6 +1396,65 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. ENDMETHOD. "CALCULATE_COLUMN_WIDTHS + METHOD change_area_style. + + DATA: lv_row TYPE zexcel_cell_row, + lv_row_start TYPE zexcel_cell_row, + lv_row_to TYPE zexcel_cell_row, + lv_column_int TYPE zexcel_cell_column_alpha, + lv_column TYPE zexcel_cell_column_alpha, + lv_column_start TYPE zexcel_cell_column_alpha, + lv_column_end TYPE zexcel_cell_column_alpha, + lv_column_start_int TYPE zexcel_cell_column_alpha, + lv_column_end_int TYPE zexcel_cell_column_alpha. + + lv_row_to = ip_row_to. + lv_row = ip_row. + + IF lv_row_to IS INITIAL OR ip_row_to IS NOT SUPPLIED. + lv_row_to = lv_row. + ENDIF. + + lv_column_start = ip_column_start. + lv_column_end = ip_column_end. + + IF lv_column_end IS INITIAL OR ip_column_end IS NOT SUPPLIED. + lv_column_end = lv_column_start. + ENDIF. + + lv_column_start_int = zcl_excel_common=>convert_column2int( lv_column_start ). + lv_column_end_int = zcl_excel_common=>convert_column2int( lv_column_end ). + + IF lv_column_start_int > lv_column_end_int OR lv_row > lv_row_to. + + RAISE EXCEPTION TYPE zcx_excel + EXPORTING + error = 'Wrong Merging Parameters'. + + ENDIF. + + lv_column_int = lv_column_start_int. + lv_row_start = lv_row. + WHILE lv_column_int <= lv_column_end_int. + + lv_column = zcl_excel_common=>convert_column2alpha( lv_column_int ). + lv_row = lv_row_start. + + WHILE lv_row <= lv_row_to. + + ip_style_changer->apply( ip_worksheet = me + ip_column = lv_column_int + ip_row = lv_row ). + + ADD 1 TO lv_row. + ENDWHILE. + + ADD 1 TO lv_column_int. + ENDWHILE. + + ENDMETHOD. + + METHOD change_cell_style. DATA: changer TYPE REF TO zif_excel_style_changer. @@ -2074,12 +2142,28 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. METHOD get_columns. + + DATA: columns TYPE TABLE OF i, + column TYPE i. + FIELD-SYMBOLS: + TYPE zexcel_s_cell_data. + + LOOP AT sheet_content ASSIGNING . + COLLECT -cell_column INTO columns. + ENDLOOP. + + LOOP AT columns INTO column. + " This will create the column instance if it doesn't exist + get_column( column ). + ENDLOOP. + eo_columns = me->columns. ENDMETHOD. "GET_COLUMNS METHOD get_columns_iterator. + get_columns( ). eo_iterator = me->columns->get_iterator( ). ENDMETHOD. "GET_COLUMNS_ITERATOR @@ -2426,12 +2510,40 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. METHOD get_rows. + + DATA: row TYPE i. + FIELD-SYMBOLS: TYPE zexcel_s_cell_data. + + IF sheet_content IS NOT INITIAL. + + row = 0. + DO. + " Find the next row + READ TABLE sheet_content ASSIGNING WITH KEY cell_row = row. + CASE sy-subrc. + WHEN 4. + " row doesn't exist, but it exists another row, SY-TABIX points to the first cell in this row. + READ TABLE sheet_content ASSIGNING INDEX sy-tabix. + ASSERT sy-subrc = 0. + row = -cell_row. + WHEN 8. + " it was the last available row + EXIT. + ENDCASE. + " This will create the row instance if it doesn't exist + get_row( row ). + row = row + 1. + ENDDO. + + ENDIF. + eo_rows = me->rows. ENDMETHOD. "GET_ROWS METHOD get_rows_iterator. + get_rows( ). eo_iterator = me->rows->get_iterator( ). ENDMETHOD. "GET_ROWS_ITERATOR @@ -2874,15 +2986,15 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. lv_column_start_int TYPE zexcel_cell_column_alpha, lv_column_end_int TYPE zexcel_cell_column_alpha. - MOVE: ip_row_to TO lv_row_end, - ip_row TO lv_row. + lv_row_end = ip_row_to. + lv_row = ip_row. IF lv_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED. lv_row_end = lv_row. ENDIF. - MOVE: ip_column_start TO lv_column_start, - ip_column_end TO lv_column_end. + lv_column_start = ip_column_start. + lv_column_end = ip_column_end. IF lv_column_end IS INITIAL OR ip_column_end IS NOT SUPPLIED. lv_column_end = lv_column_start. @@ -2997,14 +3109,14 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. ld_column_int TYPE zexcel_cell_column_alpha, ld_column_end_int TYPE zexcel_cell_column_alpha. - MOVE: ip_row_to TO ld_row_end, - ip_row TO ld_row. + ld_row_end = ip_row_to. + ld_row = ip_row. IF ld_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED. ld_row_end = ld_row. ENDIF. - MOVE: ip_column_start TO ld_column, - ip_column_end TO ld_column_end. + ld_column = ip_column_start. + ld_column_end = ip_column_end. IF ld_column_end IS INITIAL OR ip_column_end IS NOT SUPPLIED. ld_column_end = ld_column. @@ -3063,8 +3175,8 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. DATA: lv_column TYPE zexcel_cell_column, lo_hyperlink TYPE REF TO zcl_excel_hyperlink. - MOVE: ip_row_to TO ld_row_end, - ip_row TO ld_row_start. + ld_row_end = ip_row_to. + ld_row_start = ip_row. IF ld_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED. ld_row_end = ld_row_start. ENDIF. @@ -3106,8 +3218,8 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. ld_current_column TYPE zexcel_cell_column_alpha, ld_current_row TYPE zexcel_cell_row. - MOVE: ip_row_to TO ld_row_end, - ip_row TO ld_row_start. + ld_row_end = ip_row_to. + ld_row_start = ip_row. IF ld_row_end IS INITIAL OR ip_row_to IS NOT SUPPLIED. ld_row_end = ld_row_start. ENDIF. @@ -3577,8 +3689,8 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. ld_current_column TYPE zexcel_cell_column_alpha, ld_current_row TYPE zexcel_cell_row. - MOVE: ip_row_to TO ld_row_end, - ip_row TO ld_row_start. + ld_row_end = ip_row_to. + ld_row_start = ip_row. IF ld_row_end IS INITIAL. ld_row_end = ld_row_start. ENDIF. @@ -3720,7 +3832,7 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. LOOP AT ip_table ASSIGNING . lv_column_alpha = zcl_excel_common=>convert_column2alpha( lv_column_int ). ASSIGN COMPONENT -fieldname OF STRUCTURE TO . - MOVE TO lv_cell_value. + lv_cell_value = . me->set_cell( ip_column = lv_column_alpha ip_row = lv_row_int ip_value = "lv_cell_value diff --git a/src/zcl_excel_worksheet.clas.xml b/src/zcl_excel_worksheet.clas.xml index a9bcd5e..edad9b8 100644 --- a/src/zcl_excel_worksheet.clas.xml +++ b/src/zcl_excel_worksheet.clas.xml @@ -189,6 +189,12 @@ I Calculate widths for auto-size columns + + ZCL_EXCEL_WORKSHEET + CHANGE_AREA_STYLE + E + Change area style + ZCL_EXCEL_WORKSHEET CHANGE_CELL_STYLE diff --git a/src/zcl_excel_writer_2007.clas.abap b/src/zcl_excel_writer_2007.clas.abap index 9fc333a..417bd2b 100644 --- a/src/zcl_excel_writer_2007.clas.abap +++ b/src/zcl_excel_writer_2007.clas.abap @@ -699,7 +699,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lo_element = lo_document->create_simple_element( name = lc_xml_node_override parent = lo_document ). - MOVE sy-index TO lv_worksheets_numc. + lv_worksheets_numc = sy-index. SHIFT lv_worksheets_numc LEFT DELETING LEADING '0'. lv_xml_node_worksheet_pn = lc_xml_node_worksheet_pn. REPLACE ALL OCCURRENCES OF '#' IN lv_xml_node_worksheet_pn WITH lv_worksheets_numc. @@ -3589,7 +3589,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. DELETE lt_cell_data WHERE cell_formula IS NOT INITIAL. " delete formula content DESCRIBE TABLE lt_cell_data LINES lv_count. - MOVE lv_count TO lv_count_str. + lv_count_str = lv_count. " separating plain and rich text format strings lt_cell_data_rtf = lt_cell_data. @@ -3611,7 +3611,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. FREE lt_cell_data_rtf. DESCRIBE TABLE lt_cell_data LINES lv_uniquecount. - MOVE lv_uniquecount TO lv_uniquecount_str. + lv_uniquecount_str = lv_uniquecount. SHIFT lv_uniquecount_str RIGHT DELETING TRAILING space. SHIFT lv_uniquecount_str LEFT DELETING LEADING space. @@ -3620,9 +3620,9 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. LOOP AT lt_cell_data ASSIGNING WHERE data_type = 's'. * lv_sytabix = sy-tabix - 1. lv_sytabix = lv_count. - MOVE lv_sytabix TO ls_shared_string-string_no. - MOVE -cell_value TO ls_shared_string-string_value. - MOVE -data_type TO ls_shared_string-string_type. + ls_shared_string-string_no = lv_sytabix. + ls_shared_string-string_value = -cell_value. + ls_shared_string-string_type = -data_type. ls_shared_string-rtf_tab = -rtf_tab. INSERT ls_shared_string INTO TABLE shared_strings. ADD 1 TO lv_count. @@ -4395,7 +4395,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. " sheetProtection node lo_element = lo_document->create_simple_element( name = lc_xml_node_sheetprotection parent = lo_document ). - MOVE io_worksheet->zif_excel_sheet_protection~password TO lv_value. + lv_value = io_worksheet->zif_excel_sheet_protection~password. IF lv_value IS NOT INITIAL. lo_element->set_attribute_ns( name = lc_xml_attr_password value = lv_value ). @@ -4669,12 +4669,12 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lo_element_3 = lo_document->create_simple_element( name = lc_xml_node_databar parent = lo_document ). - MOVE ls_databar-cfvo1_value TO ls_cfvo-value. - MOVE ls_databar-cfvo1_type TO ls_cfvo-type. + ls_cfvo-value = ls_databar-cfvo1_value. + ls_cfvo-type = ls_databar-cfvo1_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_databar-cfvo2_value TO ls_cfvo-value. - MOVE ls_databar-cfvo2_type TO ls_cfvo-type. + ls_cfvo-value = ls_databar-cfvo2_value. + ls_cfvo-type = ls_databar-cfvo2_type. APPEND ls_cfvo TO lt_cfvo. LOOP AT lt_cfvo INTO ls_cfvo. @@ -4709,16 +4709,16 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lo_element_3 = lo_document->create_simple_element( name = lc_xml_node_colorscale parent = lo_document ). - MOVE ls_colorscale-cfvo1_value TO ls_cfvo-value. - MOVE ls_colorscale-cfvo1_type TO ls_cfvo-type. + ls_cfvo-value = ls_colorscale-cfvo1_value. + ls_cfvo-type = ls_colorscale-cfvo1_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_colorscale-cfvo2_value TO ls_cfvo-value. - MOVE ls_colorscale-cfvo2_type TO ls_cfvo-type. + ls_cfvo-value = ls_colorscale-cfvo2_value. + ls_cfvo-type = ls_colorscale-cfvo2_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_colorscale-cfvo3_value TO ls_cfvo-value. - MOVE ls_colorscale-cfvo3_type TO ls_cfvo-type. + ls_cfvo-value = ls_colorscale-cfvo3_value. + ls_cfvo-type = ls_colorscale-cfvo3_type. APPEND ls_cfvo TO lt_cfvo. APPEND ls_colorscale-colorrgb1 TO lt_colors. @@ -4788,50 +4788,50 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. zcl_excel_style_cond=>c_iconset_3symbols2 OR zcl_excel_style_cond=>c_iconset_3trafficlights OR zcl_excel_style_cond=>c_iconset_3trafficlights2. - MOVE ls_iconset-cfvo1_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo1_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo1_value. + ls_cfvo-type = ls_iconset-cfvo1_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo2_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo2_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo2_value. + ls_cfvo-type = ls_iconset-cfvo2_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo3_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo3_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo3_value. + ls_cfvo-type = ls_iconset-cfvo3_type. APPEND ls_cfvo TO lt_cfvo. WHEN zcl_excel_style_cond=>c_iconset_4arrows OR zcl_excel_style_cond=>c_iconset_4arrowsgray OR zcl_excel_style_cond=>c_iconset_4rating OR zcl_excel_style_cond=>c_iconset_4redtoblack OR zcl_excel_style_cond=>c_iconset_4trafficlights. - MOVE ls_iconset-cfvo1_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo1_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo1_value. + ls_cfvo-type = ls_iconset-cfvo1_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo2_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo2_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo2_value. + ls_cfvo-type = ls_iconset-cfvo2_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo3_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo3_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo3_value. + ls_cfvo-type = ls_iconset-cfvo3_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo4_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo4_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo4_value. + ls_cfvo-type = ls_iconset-cfvo4_type. APPEND ls_cfvo TO lt_cfvo. WHEN zcl_excel_style_cond=>c_iconset_5arrows OR zcl_excel_style_cond=>c_iconset_5arrowsgray OR zcl_excel_style_cond=>c_iconset_5quarters OR zcl_excel_style_cond=>c_iconset_5rating. - MOVE ls_iconset-cfvo1_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo1_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo1_value. + ls_cfvo-type = ls_iconset-cfvo1_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo2_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo2_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo2_value. + ls_cfvo-type = ls_iconset-cfvo2_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo3_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo3_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo3_value. + ls_cfvo-type = ls_iconset-cfvo3_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo4_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo4_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo4_value. + ls_cfvo-type = ls_iconset-cfvo4_type. APPEND ls_cfvo TO lt_cfvo. - MOVE ls_iconset-cfvo5_value TO ls_cfvo-value. - MOVE ls_iconset-cfvo5_type TO ls_cfvo-type. + ls_cfvo-value = ls_iconset-cfvo5_value. + ls_cfvo-type = ls_iconset-cfvo5_type. APPEND ls_cfvo TO lt_cfvo. WHEN OTHERS. CLEAR lt_cfvo. @@ -5791,7 +5791,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lv_index_str = iv_drawing_index. CONDENSE lv_index_str NO-GAPS. - MOVE me->c_xl_drawings TO lv_value. + lv_value = me->c_xl_drawings. REPLACE 'xl' WITH '..' INTO lv_value. REPLACE '#' WITH lv_index_str INTO lv_value. lo_element->set_attribute_ns( name = lc_xml_attr_target @@ -5823,7 +5823,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lv_index_str = iv_comment_index. CONDENSE lv_index_str NO-GAPS. - MOVE me->cl_xl_drawing_for_comments TO lv_value. + lv_value = me->cl_xl_drawing_for_comments. REPLACE 'xl' WITH '..' INTO lv_value. REPLACE '#' WITH lv_index_str INTO lv_value. lo_element->set_attribute_ns( name = lc_xml_attr_target @@ -5845,7 +5845,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lv_index_str = iv_comment_index. CONDENSE lv_index_str NO-GAPS. - MOVE me->c_xl_comments TO lv_value. + lv_value = me->c_xl_comments. REPLACE 'xl' WITH '..' INTO lv_value. REPLACE '#' WITH lv_index_str INTO lv_value. lo_element->set_attribute_ns( name = lc_xml_attr_target @@ -5873,7 +5873,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lv_index_str = lv_comment_index. CONDENSE lv_index_str NO-GAPS. - MOVE me->cl_xl_drawing_for_comments TO lv_value. + lv_value = me->cl_xl_drawing_for_comments. REPLACE 'xl' WITH '..' INTO lv_value. REPLACE '#' WITH lv_index_str INTO lv_value. lo_element->set_attribute_ns( name = lc_xml_attr_target @@ -6920,25 +6920,25 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. " update attribute "count" DESCRIBE TABLE lt_fonts LINES lv_fonts_count. - MOVE lv_fonts_count TO lv_value. + lv_value = lv_fonts_count. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element_fonts->set_attribute_ns( name = lc_xml_attr_count value = lv_value ). DESCRIBE TABLE lt_fills LINES lv_fills_count. - MOVE lv_fills_count TO lv_value. + lv_value = lv_fills_count. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element_fills->set_attribute_ns( name = lc_xml_attr_count value = lv_value ). DESCRIBE TABLE lt_borders LINES lv_borders_count. - MOVE lv_borders_count TO lv_value. + lv_value = lv_borders_count. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element_borders->set_attribute_ns( name = lc_xml_attr_count value = lv_value ). DESCRIBE TABLE lt_cellxfs LINES lv_cellxfs_count. - MOVE lv_cellxfs_count TO lv_value. + lv_value = lv_cellxfs_count. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element_cellxfs->set_attribute_ns( name = lc_xml_attr_count @@ -6973,61 +6973,61 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. LOOP AT lt_cellxfs INTO ls_cellxfs. lo_element = lo_document->create_simple_element( name = lc_xml_node_xf parent = lo_document ). - MOVE ls_cellxfs-numfmtid TO lv_value. + lv_value = ls_cellxfs-numfmtid. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_numfmtid value = lv_value ). - MOVE ls_cellxfs-fontid TO lv_value. + lv_value = ls_cellxfs-fontid. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_fontid value = lv_value ). - MOVE ls_cellxfs-fillid TO lv_value. + lv_value = ls_cellxfs-fillid. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_fillid value = lv_value ). - MOVE ls_cellxfs-borderid TO lv_value. + lv_value = ls_cellxfs-borderid. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_borderid value = lv_value ). - MOVE ls_cellxfs-xfid TO lv_value. + lv_value = ls_cellxfs-xfid. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_xfid value = lv_value ). IF ls_cellxfs-applynumberformat EQ 1. - MOVE ls_cellxfs-applynumberformat TO lv_value. + lv_value = ls_cellxfs-applynumberformat. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_applynumberformat value = lv_value ). ENDIF. IF ls_cellxfs-applyfont EQ 1. - MOVE ls_cellxfs-applyfont TO lv_value. + lv_value = ls_cellxfs-applyfont. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_applyfont value = lv_value ). ENDIF. IF ls_cellxfs-applyfill EQ 1. - MOVE ls_cellxfs-applyfill TO lv_value. + lv_value = ls_cellxfs-applyfill. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_applyfill value = lv_value ). ENDIF. IF ls_cellxfs-applyborder EQ 1. - MOVE ls_cellxfs-applyborder TO lv_value. + lv_value = ls_cellxfs-applyborder. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_applyborder value = lv_value ). ENDIF. IF ls_cellxfs-applyalignment EQ 1. " depends on each style not for all the sheet - MOVE ls_cellxfs-applyalignment TO lv_value. + lv_value = ls_cellxfs-applyalignment. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_element->set_attribute_ns( name = lc_xml_attr_applyalignment @@ -7038,12 +7038,12 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. READ TABLE lt_alignments INTO ls_alignment INDEX ls_cellxfs-alignmentid. SUBTRACT 1 FROM ls_cellxfs-alignmentid. IF ls_alignment-horizontal IS NOT INITIAL. - MOVE ls_alignment-horizontal TO lv_value. + lv_value = ls_alignment-horizontal. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_horizontal value = lv_value ). ENDIF. IF ls_alignment-vertical IS NOT INITIAL. - MOVE ls_alignment-vertical TO lv_value. + lv_value = ls_alignment-vertical. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_vertical value = lv_value ). ENDIF. @@ -7052,7 +7052,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. value = c_on ). ENDIF. IF ls_alignment-textrotation IS NOT INITIAL. - MOVE ls_alignment-textrotation TO lv_value. + lv_value = ls_alignment-textrotation. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_textrotation @@ -7063,7 +7063,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. value = c_on ). ENDIF. IF ls_alignment-indent IS NOT INITIAL. - MOVE ls_alignment-indent TO lv_value. + lv_value = ls_alignment-indent. SHIFT lv_value RIGHT DELETING TRAILING space. SHIFT lv_value LEFT DELETING LEADING space. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_indent @@ -7073,7 +7073,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. lo_element->append_child( new_child = lo_sub_element_2 ). ENDIF. IF ls_cellxfs-applyprotection EQ 1. - MOVE ls_cellxfs-applyprotection TO lv_value. + lv_value = ls_cellxfs-applyprotection. CONDENSE lv_value NO-GAPS. lo_element->set_attribute_ns( name = lc_xml_attr_applyprotection value = lv_value ). @@ -7083,13 +7083,13 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. READ TABLE lt_protections INTO ls_protection INDEX ls_cellxfs-protectionid. SUBTRACT 1 FROM ls_cellxfs-protectionid. IF ls_protection-locked IS NOT INITIAL. - MOVE ls_protection-locked TO lv_value. + lv_value = ls_protection-locked. CONDENSE lv_value. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_locked value = lv_value ). ENDIF. IF ls_protection-hidden IS NOT INITIAL. - MOVE ls_protection-hidden TO lv_value. + lv_value = ls_protection-hidden. CONDENSE lv_value. lo_sub_element_2->set_attribute_ns( name = lc_xml_attr_hidden value = lv_value ). @@ -7692,25 +7692,25 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. IF me->excel->zif_excel_book_protection~protected EQ abap_true. lo_element = lo_document->create_simple_element( name = lc_xml_node_workbookprotection parent = lo_document ). - MOVE me->excel->zif_excel_book_protection~workbookpassword TO lv_value. + lv_value = me->excel->zif_excel_book_protection~workbookpassword. IF lv_value IS NOT INITIAL. lo_element->set_attribute_ns( name = lc_xml_attr_workbookpassword value = lv_value ). ENDIF. - MOVE me->excel->zif_excel_book_protection~revisionspassword TO lv_value. + lv_value = me->excel->zif_excel_book_protection~revisionspassword. IF lv_value IS NOT INITIAL. lo_element->set_attribute_ns( name = lc_xml_attr_revisionspassword value = lv_value ). ENDIF. - MOVE me->excel->zif_excel_book_protection~lockrevision TO lv_value. + lv_value = me->excel->zif_excel_book_protection~lockrevision. CONDENSE lv_value NO-GAPS. lo_element->set_attribute_ns( name = lc_xml_attr_lockrevision value = lv_value ). - MOVE me->excel->zif_excel_book_protection~lockstructure TO lv_value. + lv_value = me->excel->zif_excel_book_protection~lockstructure. CONDENSE lv_value NO-GAPS. lo_element->set_attribute_ns( name = lc_xml_attr_lockstructure value = lv_value ). - MOVE me->excel->zif_excel_book_protection~lockwindows TO lv_value. + lv_value = me->excel->zif_excel_book_protection~lockwindows. CONDENSE lv_value NO-GAPS. lo_element->set_attribute_ns( name = lc_xml_attr_lockwindows value = lv_value ). diff --git a/src/zcl_excel_writer_huge_file.clas.abap b/src/zcl_excel_writer_huge_file.clas.abap index 68f6eb1..43486fe 100644 --- a/src/zcl_excel_writer_huge_file.clas.abap +++ b/src/zcl_excel_writer_huge_file.clas.abap @@ -101,8 +101,8 @@ CLASS zcl_excel_writer_huge_file IMPLEMENTATION. LOOP AT lt_cell_data ASSIGNING . lv_sytabix = sy-tabix - 1. - MOVE lv_sytabix TO ls_shared_string-string_no. - MOVE -cell_value TO ls_shared_string-string_value. + ls_shared_string-string_no = lv_sytabix. + ls_shared_string-string_value = -cell_value. REPLACE ALL OCCURRENCES OF REGEX lv_invalid IN ls_shared_string-string_value WITH ` `. APPEND ls_shared_string TO shared_strings. diff --git a/src/zcl_excel_writer_xlsm.clas.abap b/src/zcl_excel_writer_xlsm.clas.abap index 12f667e..c275e24 100644 --- a/src/zcl_excel_writer_xlsm.clas.abap +++ b/src/zcl_excel_writer_xlsm.clas.abap @@ -151,8 +151,8 @@ CLASS zcl_excel_writer_xlsm IMPLEMENTATION. lv_content = me->create_xl_sheet( io_worksheet = lo_worksheet iv_active = lv_active ). lv_xl_sheet = me->c_xl_sheet. - MOVE sy-index TO: lv_syindex, - lv_comment_index. " (+) Issue 588 + lv_syindex = sy-index. + lv_comment_index = sy-index. " (+) Issue 588 SHIFT lv_syindex RIGHT DELETING TRAILING space. SHIFT lv_syindex LEFT DELETING LEADING space. REPLACE ALL OCCURRENCES OF '#' IN lv_xl_sheet WITH lv_syindex. @@ -182,7 +182,7 @@ CLASS zcl_excel_writer_xlsm IMPLEMENTATION. * Add drawings ********************************** lo_drawings = lo_worksheet->get_drawings( ). IF lo_drawings->is_empty( ) = abap_false. - MOVE lv_drawing_index TO lv_syindex. + lv_syindex = lv_drawing_index. SHIFT lv_syindex RIGHT DELETING TRAILING space. SHIFT lv_syindex LEFT DELETING LEADING space. diff --git a/src/zexcel_cell_style.dtel.xml b/src/zexcel_cell_style.dtel.xml index 9e7bdf0..470f5d1 100644 --- a/src/zexcel_cell_style.dtel.xml +++ b/src/zexcel_cell_style.dtel.xml @@ -5,7 +5,6 @@ ZEXCEL_CELL_STYLE E - UUID 16 10 16 @@ -16,7 +15,9 @@ Style identifier Style identifier E - D + RAW + 000016 + 000032 diff --git a/src/zexcel_range_guid.dtel.xml b/src/zexcel_range_guid.dtel.xml index 3d43480..38941fe 100644 --- a/src/zexcel_range_guid.dtel.xml +++ b/src/zexcel_range_guid.dtel.xml @@ -5,7 +5,6 @@ ZEXCEL_RANGE_GUID E - UUID 32 10 15 @@ -16,7 +15,9 @@ Range guid Range guid E - D + RAW + 000016 + 000032 diff --git a/src/zexcel_s_converter_fcat.tabl.xml b/src/zexcel_s_converter_fcat.tabl.xml index 43ab307..68e1aba 100644 --- a/src/zexcel_s_converter_fcat.tabl.xml +++ b/src/zexcel_s_converter_fcat.tabl.xml @@ -40,11 +40,13 @@ INTTYPE - INTTYPE 0 - X - F - E + C + 000002 + CHAR + 000001 + CHAR + ABAP data type (C,D,N,...) DECIMALS diff --git a/src/zexcel_s_styles_cond_mapping.tabl.xml b/src/zexcel_s_styles_cond_mapping.tabl.xml index ee10d5f..66570e4 100644 --- a/src/zexcel_s_styles_cond_mapping.tabl.xml +++ b/src/zexcel_s_styles_cond_mapping.tabl.xml @@ -12,9 +12,12 @@ GUID - GUID_16 0 - E + X + 000016 + RAW + 000016 + RAW STYLE diff --git a/src/zexcel_s_styles_mapping.tabl.xml b/src/zexcel_s_styles_mapping.tabl.xml index f5d677d..ba3847b 100644 --- a/src/zexcel_s_styles_mapping.tabl.xml +++ b/src/zexcel_s_styles_mapping.tabl.xml @@ -12,9 +12,12 @@ GUID - GUID_16 0 - E + X + 000016 + RAW + 000016 + RAW STYLE