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

SET_CELL_FORMULA doesn't work for cells not previously initialized #866

Closed
sandraros opened this issue Nov 1, 2021 · 1 comment · Fixed by #868
Closed

SET_CELL_FORMULA doesn't work for cells not previously initialized #866

sandraros opened this issue Nov 1, 2021 · 1 comment · Fixed by #868
Assignees
Labels

Comments

@sandraros
Copy link
Collaborator

sandraros commented Nov 1, 2021

The following code doesn't show a formula in cell A1:

REPORT.
CONSTANTS: gc_save_file_name TYPE string VALUE 'test.xlsx'.
INCLUDE zdemo_excel_outputopt_incl.
START-OF-SELECTION.
  DATA(lo_excel) = new zcl_excel( ).
  DATA(lo_worksheet) = lo_excel->get_active_worksheet( ).
  lo_worksheet->set_cell_formula( ip_column = 1 ip_row = 1 ip_formula = '"hello"&" "&"world"' ).
  lcl_output=>output( lo_excel ).

Actual result:
image

Expected result:
image

@sandraros sandraros self-assigned this Nov 2, 2021
sandraros pushed a commit that referenced this issue Nov 2, 2021
Fix #866
AndreaBorgia-Abo added a commit that referenced this issue Nov 4, 2021
* Fix #866

Co-authored-by: Abo <andrea@borgia.bo.it>
Co-authored-by: sandraros <sandra.rossi@gmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
@AndreaBorgia-Abo
Copy link
Member

@sandraros I'm reviewing the SET_AREA PR and one thing caught my eye in your test report and it's that the workaround for this bug is apparently still needed but ONLY when running against Libreoffice 7.2.2.2 under Linux.

With workaround:
immagine

Without workaround:
immagine

Excel 2013 behaves as advertised, so I am NOT reopening this.

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

Successfully merging a pull request may close this issue.

2 participants