From 9b6bf15277c713d16e2516cebd8bcecc2c40a0e2 Mon Sep 17 00:00:00 2001 From: sandraros <34005250+sandraros@users.noreply.github.com> Date: Thu, 4 Nov 2021 19:54:50 +0100 Subject: [PATCH] SET_CELL_FORMULA: set formula even if cell was uninitialized (#868) * Fix #866 Co-authored-by: Abo Co-authored-by: sandraros Co-authored-by: Lars Hvam --- src/zcl_excel_worksheet.clas.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zcl_excel_worksheet.clas.abap b/src/zcl_excel_worksheet.clas.abap index 1901d277f..306885bff 100644 --- a/src/zcl_excel_worksheet.clas.abap +++ b/src/zcl_excel_worksheet.clas.abap @@ -3724,8 +3724,8 @@ CLASS zcl_excel_worksheet IMPLEMENTATION. lv_column = zcl_excel_common=>convert_column2int( ip_column ). READ TABLE me->sheet_content ASSIGNING WITH TABLE KEY cell_row = ip_row cell_column = lv_column. - IF sy-subrc <> 0. " Create new entry in sheet_content if necessary - CHECK ip_formula IS INITIAL. " no need to create new entry in sheet_content when no formula is passed + IF sy-subrc <> 0. " Create new entry in sheet_content if necessary + CHECK ip_formula IS NOT INITIAL. " only create new entry in sheet_content when a formula is passed ls_sheet_content-cell_row = ip_row. ls_sheet_content-cell_column = lv_column. INSERT ls_sheet_content INTO TABLE me->sheet_content ASSIGNING .