QXlsx
QXlsx copied to clipboard
Cell formula from row/col
Imagine I want to define a formula like =SUM(A1, A100).
However, I don't know the letter of my column nor the row I'm working on. This is because I'm dynamically filling a document from a flow of data from a db.
All I have is a bunch of numeric row/col. Is there any way to create a formula from them?
Otherwise, if I used cellAt to get the Cell * at a given position, is there any way to get from that its string representation (like A5)?
Thank you.
I'll register this issue as invalid. Thanks for reporting.
I'll register this issue as invalid.
Why as invalid? I mean, if there is a way to do that, then I'd be glad to know it. Otherwise it could be an useful add-on, couldn't it? In both cases, an answer would be useful for future users. :wink:
The function you mentioned is a function that must be supported by the ECMA-376 standard. But QXlsx does not support. 😞
And it's not easy to develop this function with my personal work now... As you know, South Korea is distracted by the corona virus, and my life is hampered...
I see. So, is the project no longer maintained or is there the possibility to see it evolve in future? It's pretty interesting and full of functionalities, it would be great if it won't get abandoned.
The formula is the most used function in Excel, so it is necessary. I will register as an enhancement for the future.
And I wish the damn corona virus to go away quickly.
I also created an Excel template to work with, but using QXlsx to process the document would cause all the formulas in the template to be cleared to "#DIV/0!" such characters. Can I save Excel without changing the original formula?
Dear @Shine6Z Not now. I hope it will go well someday. 😢
Dear @Shine6Z Not now. I hope it will go well someday. 😢
Now I use another table to apply the scheme to solve the problem. The required data of the formula table is obtained from another non-formula table, and the data format and formula of the source table are not changed, so that my formula requirements can be realized. I do not know whether the NPOI project is helpful to this project.
When I summarize the issues in the meantime, it seems that there are many problems in the following fields.
- formulas
- charts
- comments
- large amounts of data
- only part of the ECMA standard is applied.
I am waiting for those who can help with these issues. Of course, I'm also working on it, but my personal commercial project is immersed in mud, making it difficult to solve in a short time.
My English is not good. If the sentence is strange, ask again please.
When I summarize the issues in the meantime, it seems that there are many problems in the following fields.
- formulas
- charts
- comments
- large amounts of data
- only part of the ECMA standard is applied.
I am waiting for those who can help with these issues. Of course, I'm also working on it, but my personal commercial project is immersed in mud, making it difficult to solve in a short time.
My English is not good. If the sentence is strange, ask again please.
Thank you for your reply. I think I can use data table and formula call table to achieve data calculation at present. I will still follow up and look for solutions for this problem in the future, because this thing is often used.
As workaoround use code like this:
`auto bruttoCell = QXlsx::CellReference(row, col);
const auto &formcCosts = QString("=%1/2 ").arg(bruttoCell.toString());
c++;
doc.write(row, col, formcCosts);`