Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-08

fplazspreadsheet formula

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bogusław Brandys

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

Reply by email

José Mejuto
to Bogusław Brandys

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.

Best regards, Jos?

Reply by email

Bogusław Brandys
to José Mejuto

Jos? Mejuto pisze:

Show quoted text 12 lines
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.

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

Reply by email

José Mejuto
to Bogusław Brandys

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 ?

Best regards, Jos?

Reply by email

Bogusław Brandys
to José Mejuto

Jos? Mejuto pisze:

Show quoted text 20 lines
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 ?

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

Reply by email

Andreas Schneider
to Bogusław Brandys
Bogus?aw Brandys wrote 11 lines
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

Reply by email

Felipe Monteiro de Carvalho
to Andreas Schneider

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

Reply by email

Bogusław Brandys
to Felipe Monteiro de Carvalho

Felipe Monteiro de Carvalho pisze:

Show quoted text 18 lines
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 =)

The problem is I see no difference in formula record between biff 5 and 8 in doc.

Boguslaw

Reply by email

José Mejuto
to Bogusław Brandys

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.

Best regards, Jos?

Reply by email