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

Formulas broken #354

Open
AndreiCherniaev opened this issue Aug 28, 2024 · 1 comment
Open

Formulas broken #354

AndreiCherniaev opened this issue Aug 28, 2024 · 1 comment

Comments

@AndreiCherniaev
Copy link

AndreiCherniaev commented Aug 28, 2024

example generates file demo1.xlsx with formula, but formula doesn't work:
libre

How fix? In LibreOffice Calc I should replace = to = (yes, the same symbol) and press Enter...
fix

Formula feature in QXlsx totally broken?

I use last git QXlsx version 11bafef, Qt 6.8, GCC 13

@AndreiCherniaev
Copy link
Author

AndreiCherniaev commented Dec 19, 2024

I found where the formula feature in QXlsx is broken and where it can works. If you use CellFormula::NormalType then the formula feature is broken (Recalculate Hard need), but if you use CellFormula::SharedType then the formula feature works...

int A2= 1;
int B2= 3;
xlsxW.write(2, 1, A2);
xlsxW.write(2, 2, B2);
sheet->writeFormula("E2", CellFormula("A2+B2")); //problem because of not CellFormula::SharedType
//sheet->writeFormula("E2", CellFormula("A2+B2", "E2", CellFormula::SharedType)); //but this will work
xlsxW.save();

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