poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishant Chandra <nishant.chan...@gmail.com>
Subject HSSF External function
Date Thu, 26 May 2005 16:44:53 GMT
I ran biffviewer and got the following output.

The formula set was BLP(B1,C1,D1);
Here function name has been set to externflag (below);
The formula i get on the excel is B1(C1,D1)
The function name BLP is lost;
If I manually enter the function name, excel accpets the function name.
Can some1 help me on this.

[FORMULA]
    .row       = 0
    .column    = 0
    .xf              = f
    .value           = 0.0
    .options         = 2
    .zero            = 0
    .expressionlength= 19
    .numptgsinarray  = 4
Formula 0=[ValueReferencePtg]
row = 0
col = -16383
rowrelative = true
colrelative = true

00000000 44 00 00 01 C0                                  D....

Formula 1=[ValueReferencePtg]
row = 0
col = -16382
rowrelative = true
colrelative = true

00000000 44 00 00 02 C0                                  D....

Formula 2=[ValueReferencePtg]
row = 0
col = -16381
rowrelative = true
colrelative = true

00000000 44 00 00 03 C0                                  D....

Formula 3=<FunctionVarPtg>
   field_1_num_args=3
      name         =externalflag
   field_2_fnc_index=255
</FunctionPtg>
00000000 42 03 FF 00                                     B...

[/FORMULA]

Offset 0x656 (1622)
recordid = 0x203, size = 14
[NUMBER]
    .row            = 0
    .col            = 1
    .xfindex        = f
    .value          = 1.0
[/NUMBER]

Offset 0x668 (1640)
recordid = 0x203, size = 14
[NUMBER]
    .row            = 0
    .col            = 2
    .xfindex        = f
    .value          = 2.0
[/NUMBER]

Offset 0x67a (1658)
recordid = 0x203, size = 14
[NUMBER]
    .row            = 0
    .col            = 3
    .xfindex        = f
    .value          = 3.0
[/NUMBER]

The output I get if I manually make an excel file an enter the formula is.

FORMULA]
    .row       = 0
    .column    = 0
    .xf              = f
    .value (NaN)     = 00000000 00 00 0C 00 CA 04 FF FF               
         ........

    .options         = 0
    .zero            = -52428800
    .expressionlength= 26
    .numptgsinarray  = 5
Formula 0=class org.apache.poi.hssf.record.formula.NameXPtg
00000000 39 00 00 01 00 00 00                            9......

Formula 1=[ValueReferencePtg]
row = 0
col = -16383
rowrelative = true
colrelative = true

00000000 24 00 00 01 C0                                  $....

Formula 2=[ValueReferencePtg]
row = 0
col = -16382
rowrelative = true
colrelative = true

00000000 24 00 00 02 C0                                  $....

Formula 3=[ValueReferencePtg]
row = 0
col = -16381
rowrelative = true
colrelative = true

00000000 24 00 00 03 C0                                  $....

Formula 4=<FunctionVarPtg>
   field_1_num_args=4
      name         =externalflag
   field_2_fnc_index=255
</FunctionPtg>
00000000 42 04 FF 00                                     B...

[/FORMULA]

All other output is same.
-------------------------------------------------------------------------------------
I modified abstractfunctionptg class (functions - producehash and
functiondata) to accept a new formula name. It now accepts new
function name but when I write the function using setcellformula and
the later open the file, it gives an error and crashes. When I read
the formula using getcellformula, I can do it without any problems.

I tried debugging and the formula name passed and no of arguments is correct.
THe function is a valid function in excel. iS this a bug?

Website: www.cse.iitb.ac.in/~nishantc

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Mime
View raw message