diff --git a/src/zdemo_excel47.prog.abap b/src/zdemo_excel47.prog.abap index 539890a..ad916b1 100644 --- a/src/zdemo_excel47.prog.abap +++ b/src/zdemo_excel47.prog.abap @@ -101,7 +101,7 @@ CLASS lcl_app IMPLEMENTATION. -totals_function = zcl_excel_table=>totals_function_sum. WHEN 'FORMULA_2'. " each cell may have a distinct formula, a formula is applied to future new rows - -scrtext_l = 'Formula except 1 cell & aggregate fu.'. + -column_name = 'Formula except 1 cell and aggregate function'. -formula = abap_true. -column_formula = lv_f1. " to apply to future rows -totals_function = zcl_excel_table=>totals_function_min. @@ -116,12 +116,12 @@ CLASS lcl_app IMPLEMENTATION. -column_formula = 'D2+100'. WHEN 'COLUMN_FORMULA_3'. " The column formula applies to all rows and to future new rows. Internally, the formula is shared. - -scrtext_l = 'C3. Column formula & aggregate function'. + -column_name = 'C3. Column formula and aggregate function'. -column_formula = 'D2+100'. -totals_function = zcl_excel_table=>totals_function_max. WHEN 'COLUMN_FORMULA_4'. " The column formula applies to all rows and to future new rows. Internally, the formula is shared. - -scrtext_l = 'C4. Column formula array fu./named range'. + -column_name = 'C4. Column formula array function/named range'. -column_formula = 'A1&";"&_xlfn.IFS(TRUE,NamedRange)'. " =A1&";"&@IFS(TRUE,NamedRange) WHEN 'COLUMN_FORMULA_5'. " The column formula applies to all rows and to future new rows. Internally, the formula is NOT shared because it refers to a different sheet. @@ -130,12 +130,12 @@ CLASS lcl_app IMPLEMENTATION. WHEN 'COLUMN_FORMULA_6'. " The column formula applies to all rows and to future new rows. Internally, the formula is NOT shared. " The formula seen in Excel: =FILTER(TblSheet2[Company Name],TblSheet2[Airline ID]=[@Airline],"") - -scrtext_l = 'C6. Column formula array fu./other sheet'. + -column_name = 'C6. Column formula array function/other sheet'. -column_formula = '_xlfn.FILTER(TblSheet2[Company Name],TblSheet2[Company ID]=TblSheet1[[#This Row],[Company ID]],"")'. WHEN 'COLUMN_FORMULA_7'. " The column formula applies to all rows and to future new rows. Internally, the formula is NOT shared. " The formula seen in Excel: =FILTER(Tbl2_Sheet1[Company Name],Tbl2_Sheet1[Airline ID]=[@Airline],"") - -scrtext_l = 'C7. Column formula array fu./same sheet'. + -column_name = 'C7. Column formula array fu./same sheet'. -column_formula = '_xlfn.FILTER(Tbl2_Sheet1[Company Name],Tbl2_Sheet1[Company ID]=TblSheet1[[#This Row],[Company ID]],"")'. ENDCASE. ENDLOOP. @@ -152,6 +152,9 @@ CLASS lcl_app IMPLEMENTATION. is_table_settings = ls_table_settings iv_default_descr = 'L' ). + " Late change of column title is possible + lo_worksheet->set_cell( ip_columnrow = 'M1' ip_value = 'C7. Column formula array function/same sheet' ). + " Named range for formula 4 lo_range = lo_excel->add_new_range( ). lo_range->name = 'NamedRange'. diff --git a/src/zdemo_excel47.prog.xml b/src/zdemo_excel47.prog.xml index 3469526..c6c3ded 100644 --- a/src/zdemo_excel47.prog.xml +++ b/src/zdemo_excel47.prog.xml @@ -15,7 +15,7 @@ R - abap2xlsx Demo: Table Calculated Columns (from Excel 365 or 2019) + abap2xlsx Demo: Table Calculated Columns (from Excel 365 or 2021) 65