You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Todd McGrath <mc...@supergloo.com> on 2004/02/23 21:23:07 UTC

tracking down "Unknown Ptg" errors

Hello,
Long time listener, 1st time caller.

I'm experiencing the issue described here:
http://www.mail-archive.com/poi-user@jakarta.apache.org/msg03074.html

In short, I read in an existing Excel, set some cell data using POI 2.0 Final
20040126 and then write back out to a different name.  Console is showing:

[WARNING] Unknown Ptg 3c (60)
[WARNING] Unknown Ptg 3c (60)
[WARNING] Unknown Ptg 60 (96)
[WARNING] Unknown Ptg 60 (96)
[WARNING] Unknown Ptg 11 (17) at cell (3,20)
[WARNING] Unknown Ptg 11 (17) at cell (15,22)
[WARNING] Unknown Ptg 11 (17) at cell (15,24)
[WARNING] Unknown Ptg 11 (17) at cell (16,22)
[WARNING] Unknown Ptg 11 (17) at cell (16,24)
[WARNING] Unknown Ptg 11 (17) at cell (18,22)
[WARNING] Unknown Ptg 11 (17) at cell (19,22)

The new file opens fine in Excel 2000, but when I try to save, Excel crashes.

Can someone point me in the right direction for tracking these Unknown Ptg
errors down?  For example, does "Unknown Ptg 3c (60)" give me a indication on
where the problem is occuring; does "Unknown Ptg 11 (17) at cell (3,20)" mean
the problem is occurring at sheet 17, column 3, row 20? 

I'm not the author the input spreadsheet.  I'm hoping to make changes in the
spreadsheet to resolve.  (Similar to the link I sent above).

Thank you,
Todd



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: tracking down "Unknown Ptg" errors

Posted by "Andrew C. Oliver" <ac...@apache.org>.
Its almost that simple.  You'll need a Ptg class that implements it, edit
the FormulaParser so that it understand how to go TO and FROM that type of
formula.  

Basically forumlas are parsed from "SUM(A1:A2)" to reverse polish notation
in a binary format composed of "Parse Things" (A1:A2) would have a range
ParseThing which has a given structure beginning with an id (3c is for
instance an ID which you're choking on).  These can be of variable length.
You'll need a class that understands that structure.  You'll need the
formula parser to understand how to work with it, and so forth.  Start with
the TestFormula.java test case and work your way backwards.  Its pretty
elegant the way it works.

In the future I think we'll need something more like JACC...However, its
good right now.

-andy
-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.

> From: Todd McGrath <mc...@supergloo.com>
> Reply-To: "POI Users List" <po...@jakarta.apache.org>
> Date: Tue, 24 Feb 2004 08:37:10 -0800
> To: POI Users List <po...@jakarta.apache.org>
> Subject: Re: tracking down "Unknown Ptg" errors
> 
> Thanks for the quick response.
> 
> I'll file a bug report as 1st step.
> 
> On quick look at the code, I'm assuming one area that will need adjustment is
> the createPtg method in the Ptg class?  I'm thinking of adding a new "case"
> test and write a new Ptg class.  This should address these warnings:
> 
> [WARNING] Unknown Ptg 3c (60)
> [WARNING] Unknown Ptg 3c (60)
> [WARNING] Unknown Ptg 60 (96)
> [WARNING] Unknown Ptg 60 (96)
> 
> Am I on the right path?
> 
> -Todd
> 
> Quoting "Andrew C. Oliver" <ac...@apache.org>:
> 
>> It means it is a token for formulas that we haven't implemented.  Since
>> formula tokens are variable length this is a fairly serious warning (and
>> cannot be suppressed as a result).  Its just going to be a matter of someone
>> picking up a hammer and implementing the few remaining things we can't do in
>> formulas.  
>> 
>> If you're not happy writing parsers and playing with hex dumps, you can
>> still contribute to the cause by filing a bug report and attaching a sample
>> sheet.
>> 
>> -Andy
>> -- 
>> Andrew C. Oliver
>> http://www.superlinksoftware.com/poi.jsp
>> Custom enhancements and Commercial Implementation for Jakarta POI
>> 
>> http://jakarta.apache.org/poi
>> For Java and Excel, Got POI?
>> 
>> The views expressed in this email are those of the author and are almost
>> definitely not shared by the Apache Software Foundation, its board or its
>> general membership.  In fact they probably most definitively disagree with
>> everything espoused in the above email.
>> 
>>> From: Todd McGrath <mc...@supergloo.com>
>>> Reply-To: "POI Users List" <po...@jakarta.apache.org>
>>> Date: Mon, 23 Feb 2004 12:23:07 -0800
>>> To: POI Users List <po...@jakarta.apache.org>
>>> Subject: tracking down "Unknown Ptg" errors
>>> 
>>> Hello,
>>> Long time listener, 1st time caller.
>>> 
>>> I'm experiencing the issue described here:
>>> http://www.mail-archive.com/poi-user@jakarta.apache.org/msg03074.html
>>> 
>>> In short, I read in an existing Excel, set some cell data using POI 2.0
>> Final
>>> 20040126 and then write back out to a different name.  Console is showing:
>>> 
>>> [WARNING] Unknown Ptg 3c (60)
>>> [WARNING] Unknown Ptg 3c (60)
>>> [WARNING] Unknown Ptg 60 (96)
>>> [WARNING] Unknown Ptg 60 (96)
>>> [WARNING] Unknown Ptg 11 (17) at cell (3,20)
>>> [WARNING] Unknown Ptg 11 (17) at cell (15,22)
>>> [WARNING] Unknown Ptg 11 (17) at cell (15,24)
>>> [WARNING] Unknown Ptg 11 (17) at cell (16,22)
>>> [WARNING] Unknown Ptg 11 (17) at cell (16,24)
>>> [WARNING] Unknown Ptg 11 (17) at cell (18,22)
>>> [WARNING] Unknown Ptg 11 (17) at cell (19,22)
>>> 
>>> The new file opens fine in Excel 2000, but when I try to save, Excel
>> crashes.
>>> 
>>> Can someone point me in the right direction for tracking these Unknown Ptg
>>> errors down?  For example, does "Unknown Ptg 3c (60)" give me a indication
>> on
>>> where the problem is occuring; does "Unknown Ptg 11 (17) at cell (3,20)"
>> mean
>>> the problem is occurring at sheet 17, column 3, row 20?
>>> 
>>> I'm not the author the input spreadsheet.  I'm hoping to make changes in
>> the
>>> spreadsheet to resolve.  (Similar to the link I sent above).
>>> 
>>> Thank you,
>>> Todd
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: tracking down "Unknown Ptg" errors

Posted by Todd McGrath <mc...@supergloo.com>.
Thanks for the quick response.

I'll file a bug report as 1st step.

On quick look at the code, I'm assuming one area that will need adjustment is
the createPtg method in the Ptg class?  I'm thinking of adding a new "case"
test and write a new Ptg class.  This should address these warnings:

[WARNING] Unknown Ptg 3c (60)
[WARNING] Unknown Ptg 3c (60)
[WARNING] Unknown Ptg 60 (96)
[WARNING] Unknown Ptg 60 (96)

Am I on the right path?

-Todd

Quoting "Andrew C. Oliver" <ac...@apache.org>:

> It means it is a token for formulas that we haven't implemented.  Since
> formula tokens are variable length this is a fairly serious warning (and
> cannot be suppressed as a result).  Its just going to be a matter of someone
> picking up a hammer and implementing the few remaining things we can't do in
> formulas.  
> 
> If you're not happy writing parsers and playing with hex dumps, you can
> still contribute to the cause by filing a bug report and attaching a sample
> sheet.
> 
> -Andy
> -- 
> Andrew C. Oliver
> http://www.superlinksoftware.com/poi.jsp
> Custom enhancements and Commercial Implementation for Jakarta POI
> 
> http://jakarta.apache.org/poi
> For Java and Excel, Got POI?
> 
> The views expressed in this email are those of the author and are almost
> definitely not shared by the Apache Software Foundation, its board or its
> general membership.  In fact they probably most definitively disagree with
> everything espoused in the above email.
> 
> > From: Todd McGrath <mc...@supergloo.com>
> > Reply-To: "POI Users List" <po...@jakarta.apache.org>
> > Date: Mon, 23 Feb 2004 12:23:07 -0800
> > To: POI Users List <po...@jakarta.apache.org>
> > Subject: tracking down "Unknown Ptg" errors
> > 
> > Hello,
> > Long time listener, 1st time caller.
> > 
> > I'm experiencing the issue described here:
> > http://www.mail-archive.com/poi-user@jakarta.apache.org/msg03074.html
> > 
> > In short, I read in an existing Excel, set some cell data using POI 2.0
> Final
> > 20040126 and then write back out to a different name.  Console is showing:
> > 
> > [WARNING] Unknown Ptg 3c (60)
> > [WARNING] Unknown Ptg 3c (60)
> > [WARNING] Unknown Ptg 60 (96)
> > [WARNING] Unknown Ptg 60 (96)
> > [WARNING] Unknown Ptg 11 (17) at cell (3,20)
> > [WARNING] Unknown Ptg 11 (17) at cell (15,22)
> > [WARNING] Unknown Ptg 11 (17) at cell (15,24)
> > [WARNING] Unknown Ptg 11 (17) at cell (16,22)
> > [WARNING] Unknown Ptg 11 (17) at cell (16,24)
> > [WARNING] Unknown Ptg 11 (17) at cell (18,22)
> > [WARNING] Unknown Ptg 11 (17) at cell (19,22)
> > 
> > The new file opens fine in Excel 2000, but when I try to save, Excel
> crashes.
> > 
> > Can someone point me in the right direction for tracking these Unknown Ptg
> > errors down?  For example, does "Unknown Ptg 3c (60)" give me a indication
> on
> > where the problem is occuring; does "Unknown Ptg 11 (17) at cell (3,20)"
> mean
> > the problem is occurring at sheet 17, column 3, row 20?
> > 
> > I'm not the author the input spreadsheet.  I'm hoping to make changes in
> the
> > spreadsheet to resolve.  (Similar to the link I sent above).
> > 
> > Thank you,
> > Todd
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: tracking down "Unknown Ptg" errors

Posted by "Andrew C. Oliver" <ac...@apache.org>.
It means it is a token for formulas that we haven't implemented.  Since
formula tokens are variable length this is a fairly serious warning (and
cannot be suppressed as a result).  Its just going to be a matter of someone
picking up a hammer and implementing the few remaining things we can't do in
formulas.  

If you're not happy writing parsers and playing with hex dumps, you can
still contribute to the cause by filing a bug report and attaching a sample
sheet.

-Andy
-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.

> From: Todd McGrath <mc...@supergloo.com>
> Reply-To: "POI Users List" <po...@jakarta.apache.org>
> Date: Mon, 23 Feb 2004 12:23:07 -0800
> To: POI Users List <po...@jakarta.apache.org>
> Subject: tracking down "Unknown Ptg" errors
> 
> Hello,
> Long time listener, 1st time caller.
> 
> I'm experiencing the issue described here:
> http://www.mail-archive.com/poi-user@jakarta.apache.org/msg03074.html
> 
> In short, I read in an existing Excel, set some cell data using POI 2.0 Final
> 20040126 and then write back out to a different name.  Console is showing:
> 
> [WARNING] Unknown Ptg 3c (60)
> [WARNING] Unknown Ptg 3c (60)
> [WARNING] Unknown Ptg 60 (96)
> [WARNING] Unknown Ptg 60 (96)
> [WARNING] Unknown Ptg 11 (17) at cell (3,20)
> [WARNING] Unknown Ptg 11 (17) at cell (15,22)
> [WARNING] Unknown Ptg 11 (17) at cell (15,24)
> [WARNING] Unknown Ptg 11 (17) at cell (16,22)
> [WARNING] Unknown Ptg 11 (17) at cell (16,24)
> [WARNING] Unknown Ptg 11 (17) at cell (18,22)
> [WARNING] Unknown Ptg 11 (17) at cell (19,22)
> 
> The new file opens fine in Excel 2000, but when I try to save, Excel crashes.
> 
> Can someone point me in the right direction for tracking these Unknown Ptg
> errors down?  For example, does "Unknown Ptg 3c (60)" give me a indication on
> where the problem is occuring; does "Unknown Ptg 11 (17) at cell (3,20)" mean
> the problem is occurring at sheet 17, column 3, row 20?
> 
> I'm not the author the input spreadsheet.  I'm hoping to make changes in the
> spreadsheet to resolve.  (Similar to the link I sent above).
> 
> Thank you,
> Todd
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org