poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajkumar Balakrishnasamy <awesome.sa...@gmail.com>
Subject Re: Unable to read image xls files - Negative array index exception occurs in EscherBSERecord class
Date Fri, 14 Feb 2014 14:00:06 GMT
Hi Nick,

Where did it come from?
1. Source of file creation is unknown.

First, we need to know if it's a corrupted file, or if it's something we
can work around. Does the Binary File Format Validator pass it?
2.  BIFFValidation result: failed.
------------------------------------------------------------------------------------------------------------------------------
    <Type builtinType="GUID" streamName="SummaryInformation"
streamOffset="4088" hexStreamOffset="0xff8" childId="2" hexChildId="0x2">
      <Info>Built-in type "GUID": Unsigned 16-byte integer.</Info>
    </Type>
  </ParseStack>
  <LastData><![CDATA[
]]></LastData>
</BFFValidation>
-------------------------------------------------------------------------------------------------------------------------------
3. Issue id:
     1. https://issues.apache.org/bugzilla/show_bug.cgi?id=47252
     2. http://osdir.com/ml/dev-poi.apache.org/2009-05/msg00094.html
4. Not possible to attach the source doc.But the document contains lot of
images.

Where did it come from?
5. MS office excel, Kingsoft office are rendering that document properly &
Libreoffice is not rendering properly.
6. I could read the document if I saved it from MS office excel and open it
from my software.


Thanks & Regards,
Rajkumar B


On Thu, Feb 13, 2014 at 8:19 PM, Nick Burch <apache@gagravarr.org> wrote:

> On Thu, 13 Feb 2014, Rajkumar Balakrishnasamy wrote:
>
>> I am trying to read the corrupt image xls document using poi library.But
>> problem is  I am retrieving the bytesRemaining value wrongly
>>
>> Actual value I am getting:
>> 55028
>>
>> Expected value:
>> 120564
>>
>> as bytes read is also 120564  which causes negative  array index exception
>> in the line  _remainingData = new byte[bytesRemaining].how can be it
>> fixed?
>>
>
> Looks like your file has less data in it than it ought to for a given
> record, and we're reading off the end of it
>
>  please provide any suggestions
>>
>
> First, we need to know if it's a corrupted file, or if it's something we
> can work around. Does the Binary File Format Validator pass it? Can Excel
> read it? Where did it come from?
>
> Then, you'll likely need to read the [MS-XLS] file format spec, and
> compare the values in your file to that. Are there optional bits that POI
> is always reading for example?
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message