You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Dobson, Paul L CTR USAF AFMC 416 SCMS/OBN" <Pa...@HILL.af.mil> on 2008/08/21 19:59:06 UTC

Occasional incorrect value when parsing a sheet using poi-3.5-beta1

I found that while parsing a sheet using poi-3.5-beta1, I occasionally
get the wrong value.  Usually, it is a value that only exists in a sheet
other than the one I am parsing but is in the same workbook.  This is
what I learned after some troubleshooting.

 

The XML for one of the cells in the sheet I am processing is as follows:

 

<c r="H1775" s="4" t="s">

<v>7336</v> 

</c>

 

When the following method is called:

 

public void characters(char[] ch, int start, int length) throws
SAXException

 

ch.length=2048

Start = 2045

Length=3

 

 

The final 3 values of ch are "733".  It appears that ch was clipped
before including  the last character of 6.  When calling
"sst.getSharedStringAt(733)" instead of 7336, I get a seemingly random
value from a random cell in a random sheet within the workbook. 

 

I have confirmed that this exact situation happens several times while
parsing the worksheet. Does anyone know if this has been addressed?

 

Any input is greatly appreciated.

 

Paul Dobson