You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Tahir Akhtar <ta...@spectrum-tech.com> on 2006/06/22 17:46:08 UTC

Can't get the percent PTG right

Daniel, 
Sorry for bugging you again. I am trying to use your patch
[http://issues.apache.org/bugzilla/show_bug.cgi?id=39136] with poi-3.0. 

I still get A3*10 for formula entered as A3*10% . Percent never appears in
excel.

I am using src as of 2006-06-15 . Am I missing anything? Do I need another
patch to go with it.

Regards,
Tahir
-----Original Message-----
From: Tahir Akhtar [mailto:tahir@spectrum-tech.com] 
Sent: Tuesday, June 20, 2006 4:16 PM
To: 'POI Users List'
Subject: RE: Turn off warning in POI

Well, I found your patch at

http://issues.apache.org/bugzilla/attachment.cgi?id=17998

Do you recommend using this patch with POI 2.5?

-----Original Message-----
From: Tahir Akhtar [mailto:tahir@spectrum-tech.com] 
Sent: Tuesday, June 20, 2006 4:12 PM
To: 'POI Users List'
Subject: RE: Turn off warning in POI

Daniel,

I am using POI 2.5 release and I am generating workbooks based on user
input. If my user provide a formula with % such as A3*10% it appears in
excel as A3*10. The percent symbol is chopped off. 

Can I instruct POI to simply write the formula into the cell without trying
to parse it? If no, how can I fix this?

Regards,

Tahir



-----Original Message-----
From: Daniel Noll [mailto:daniel@nuix.com.au] 
Sent: Thursday, June 15, 2006 4:13 AM
To: POI Users List
Subject: Re: Turn off warning in POI

Chaudhary, Harsh wrote:
> Like you pointed out, I care for just the results of a formula and not
> the formaula itself. 
> 
> But just out of curiosity, how do you go about fixing and debugging
> something like this. I don't think the debugger is a good place as the
> sheet representation is usually very large.
> Also, if the cells which contain the formula are not recognized or
> handeled by POI, what can I do in : 
> 1. POI 2. The excel sheet 
> to take care of this?
> Its not something I need to know urgently, but I am very interested to
> know.

To take one example, we found that % signs in formulas weren't handled 
by POI, and were causing a large number of warnings (formulas such as 
A3*10% are remarkably common when spreadsheets are being used for 
taxation or interest calculations.)

So we had to implement a PercentPtg class, which turned out to be fairly 
simple.  Code also had to be added to Ptg.java to create the PercentPtg 
object when the ID matched PercentPtg.sid.

Cell reference code may be harder (or more interesting) than percent 
formulas, but existing classes like Ref3DPtg can probably go a long way 
toward figuring out what code is needed.  The hardest part is figuring 
out how "big" the Ptg is (PercentPtg was 1, Ref3DPtg is 7, etc), for 
which you would need to refer to whatever format documentation you can 
dig up.

Daniel


-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://www.nuix.com.au/                        Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
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/

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 6/14/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 6/19/2006
 


---------------------------------------------------------------------
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/

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 6/19/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 6/19/2006
 


---------------------------------------------------------------------
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/

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 6/19/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.2/372 - Release Date: 6/21/2006
 


---------------------------------------------------------------------
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/