Hi
Is formula implemented in fpspreadsheet component ? I've tested excel8write and resulting xls file has missing all cells which should contain formulas.
Regards
Boguslaw

Mailing lists / lazarus / 2010-08
10 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi
Is formula implemented in fpspreadsheet component ? I've tested excel8write and resulting xls file has missing all cells which should contain formulas.
Regards
Boguslaw
Hello Lazarus-List,
Friday, August 6, 2010, 10:25:12 PM, you wrote:
BB> Is formula implemented in fpspreadsheet component ? I've tested BB> excel8write and resulting xls file has missing all cells which should BB> contain formulas.
No, formulas are now under development. I hope to start to test them in the next week. But for sure only "basic" formulas will be supported for editting.
Jos? Mejuto pisze:
Maybe it's possible for xlsbiff8 to override WriteRPNFormula method ? IMHO I saw almost complete code commented in WriteFormula method but I don't follow it.
Boguslaw
Hello Lazarus-List,
Saturday, August 7, 2010, 8:45:47 AM, you wrote:
BB> Maybe it's possible for xlsbiff8 to override WriteRPNFormula method ? BB> IMHO I saw almost complete code commented in WriteFormula method but I BB> don't follow it.
That code is far, far away from functional, it can write a formula like:
=1+2+C1
but nothing more, also you must create manually the formula using RPN notation and the xlsbiff tokens. I think that code is from XLSBIFF5 and, I'm not sure now, some tokens write may need to be adjusted to version 8.
Or maybe you are talking about different code not in xls8biff unit ?
Jos? Mejuto pisze:
Yes,I'm talking about code from xls5biff. I've put it into xls8biff and it seems to work but in openoffice calc I see error 520 instead of formula so evidently it need adjustment. What should I change ,maybe tokens have different hex values?
What I need is simple formulas like =A1+B1 , =A1/D1 and =SUM(A1:A12), RPN is not a problem.
Currently I have to revert my code and use Excel automation class which is not portable of course.
Boguslaw
You should be able to find details about the formulas in the file format specs from Microsoft:
http://www.microsoft.com/interop/docs/officebinaryformats.mspx
Alternatively your can use the reverse engineered specs from OpenOffice.org:
http://sc.openoffice.org/excelfileformat.pdf
Hello,
If you have fpspreadsheet, then you already have the reverse engineered docs from OpenOffice.
They should be in the directory fpspreadsheet/docs
Or something similar. Basically just look in the docs for the appropriate formula changes between biff 5 and biff 8.
The real formula format should be textual, and a conversor would convert it to RPN for formats which use this notation, but I never had time and pacience to make this work.
If you read the docs and still can't figure out how to make it work, you can ask more specific questions. Of course patches always welcome =)
Felipe Monteiro de Carvalho pisze:
The problem is I see no difference in formula record between biff 5 and 8 in doc.
Boguslaw
Hello Lazarus-List,
Saturday, August 7, 2010, 10:18:06 PM, you wrote:
BB> The problem is I see no difference in formula record between biff 5 and BB> 8 in doc.
It is possible that there is no difference in most tokens, but mostly the cell addresses are different as xlsbiff8 uses 3 bytes instead 2.
More specifically, there are some cell address differences in the section:
3.3.4 Cell Addresses in BIFF8