Bug 36345 - How to find corrupted record
Summary: How to find corrupted record
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-24 22:07 UTC by Sujatha
Modified: 2006-01-02 23:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sujatha 2005-08-24 22:07:12 UTC
Hi,

I am getting File error: Data may have been lost while opening an excel file. 
My java code gets the file from db, which is put in by another application in 
VB. The VB team keeps on adding lots of formulae to the sheet, when webapp 
reads, the POI doesn't understand all of them and throws above error. 

Even though I debug with eclipse, I am unable to figure out which record teh 
POI doesn't understand. The data is chunks of byte arrays and all numbers in 
hex. I tried using biffViwer, it generated lots of unknown records, how do I 
read these numbers to figure out which record is corrupt. How do i read 
recordid below ? How do I know which records or values are bad for POI ?? 

-----UNKNOWN----------------------------------
Offset 0xa8 (168)
recordid = 0x13d, size = 28
[TABID]
    .elements        = 14
    .element_0       = 41
    .element_1       = 39
    .element_2       = 176
    .element_3       = 37
    .element_4       = 223
    .element_5       = 10
    .element_6       = 217
    .element_7       = 145
    .element_8       = 215
    .element_9       = 216
    .element_10       = 224
    .element_11       = 221
    .element_12       = 222
    .element_13       = 218
[/TABID]

-----UNKNOWN----------------------------------

Thanks for your time,
Sujatha.
Comment 1 Jason Height 2005-08-25 00:18:25 UTC
Sujatha,

Can you please download the latest code from CVS, there are a number of changes
to how the records are read and on the whole it seems like it has fixed a number
of corruption issues as well.

If that code still reports an error, please attach a sample spreadsheet to this
bug that cant be read by HSSF.

Jason
Comment 2 Sujatha 2005-09-09 22:53:23 UTC
Hi Jason,

Thanks for the reply. The excel file was re-written by VB team by reviewing all 
the macros and formulae. The POI is now able to read this file. So the problem 
is solved for now ... but may occur again, in which case I will send you the 
file. 

Tx, 
Sujatha


(In reply to comment #0)
> Hi,
> I am getting File error: Data may have been lost while opening an excel file. 
> My java code gets the file from db, which is put in by another application in 
> VB. The VB team keeps on adding lots of formulae to the sheet, when webapp 
> reads, the POI doesn't understand all of them and throws above error. 
> Even though I debug with eclipse, I am unable to figure out which record teh 
> POI doesn't understand. The data is chunks of byte arrays and all numbers in 
> hex. I tried using biffViwer, it generated lots of unknown records, how do I 
> read these numbers to figure out which record is corrupt. How do i read 
> recordid below ? How do I know which records or values are bad for POI ?? 
> -----UNKNOWN----------------------------------
> Offset 0xa8 (168)
> recordid = 0x13d, size = 28
> [TABID]
>     .elements        = 14
>     .element_0       = 41
>     .element_1       = 39
>     .element_2       = 176
>     .element_3       = 37
>     .element_4       = 223
>     .element_5       = 10
>     .element_6       = 217
>     .element_7       = 145
>     .element_8       = 215
>     .element_9       = 216
>     .element_10       = 224
>     .element_11       = 221
>     .element_12       = 222
>     .element_13       = 218
> [/TABID]
> -----UNKNOWN----------------------------------
> Thanks for your time,
> Sujatha.

Comment 3 Jason Height 2006-01-03 08:36:42 UTC
As indicated CVS/SVN has fixed the issue. Still working hard to fix all
ocorruption issues.

Jason