Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCL_EXCEL_WORKSHEET -> CONVERT_TO_TABLE wrong results if empty lines #1199

Open
gerhard-bnc opened this issue Mar 27, 2024 · 2 comments
Open

Comments

@gerhard-bnc
Copy link

Method ZCL_EXCEL_WORKSHEET -> CONVERT_TO_TABLE might return wrong results if IV_BEGIN_ROW is an empty line in the worksheet.

    READ TABLE me->sheet_content TRANSPORTING NO FIELDS WITH KEY cell_row = iv_begin_row.
    IF sy-subrc EQ 0.
      lv_index = sy-tabix.
    ENDIF.

    LOOP AT me->sheet_content ASSIGNING <ls_sheet_content> FROM lv_index.

If IV_BEGIN_ROW is an empty line and there are non-empty lines before, then READ TABLE does not find the entry and subsequent loop starts from 0 instead from worksheet line >= IV_BEGIN_ROW and adds the non-empty lines < IV_BEGIN_ROW.

@gerhard-bnc
Copy link
Author

Planning to fix this together with change for Issue 1195

gerhard-bnc added a commit to gerhard-bnc/abap2xlsx that referenced this issue Apr 8, 2024
Add param. IV_EMPTY_ROWS to take care of:
abap2xlsx#1195
abap2xlsx#1199
@gerhard-bnc
Copy link
Author

See issue 1195 suggested coding change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant