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

Incorrect cell value when generating Excel using write_file and digits with data type "s" #1202

Open
GoennerJens opened this issue Apr 9, 2024 · 4 comments

Comments

@GoennerJens
Copy link

GoennerJens commented Apr 9, 2024

Cells are filled with digits and data type char using set_cell. Incorrect values are displayed in the cell during generation.
2024-04-09_16h11_02
2024-04-09_16h14_48

@GoennerJens GoennerJens changed the title Falscher Zellenwert bei Generierung von Excel mittels write_file und ziffern mit datentyp "s"+ Incorrect cell value when generating Excel using write_file and digits with data type "s" Apr 9, 2024
@sandraros
Copy link
Collaborator

abap2xlsx permits to write numbers as numbers instead of text.
Could you indicate how to reproduce this issue?

@GoennerJens
Copy link
Author

The following error occurs in the method ZCL_EXCEL_WRITER_2007->CREATE_CL_SHAREDSTRINGS: lt_cell_value is sorted by call_value and then adjacent duplicates are deleted. However, if there are now two cells with the same cell value but one with data type ‘s’ and one with an initial data type, it is possible that only the cell with the initial data type remains in lt_cell_data. In the following loop, however, only cells with data type ‘s’ are considered. This means that the string is not written to shared_strings.
A quick fix for me was to include a ‘DELETE lt_cell_data WHERE data_type <> “s”’ However, I can also imagine better solutions here.
2024-04-25_11h38_18

@sandraros
Copy link
Collaborator

Thank you. We need first to reproduce the bug before fixing the code. Could you indicate how to reproduce this issue?

@sandraros
Copy link
Collaborator

What I was asking for, is a minimal reproducible example e.g. see one in this other issue
image

Thank you.

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

2 participants