[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    UnknownRecord prevents to add DataValidation
From:       "Pierre Lavignotte" <pierre.lavignotte () gmail ! com>
Date:       2008-12-16 14:47:45
Message-ID: 40e09acb0812160647o12476c4dh75d507bcf51e5c0e () mail ! gmail ! com
[Download RAW message or body]


Hi all,

I use POI and add DataValidation with success for a while now, but today I
get an error with a specific workbook.

When I call addValidationData(HSSFDataValidation dataValidation) I get the
following stack trace :
java.lang.IllegalStateException: Unexpected
(org.apache.poi.hssf.record.UnknownRecord) while looking for DV Table insert
pos
    at
org.apache.poi.hssf.model.RecordOrderer.findDataValidationTableInsertPos(RecordOrderer.java:240)
    at
org.apache.poi.hssf.model.RecordOrderer.findSheetInsertPos(RecordOrderer.java:95)
    at
org.apache.poi.hssf.model.RecordOrderer.addNewSheetRecord(RecordOrderer.java:89)
    at
org.apache.poi.hssf.model.Sheet.getOrCreateDataValidityTable(Sheet.java:1752)
    at
org.apache.poi.hssf.usermodel.HSSFSheet.addValidationData(HSSFSheet.java:369)

And, when debugging, it appears that the exception is thrown because both
isDVTPriorRecord(Object rb) and isDVTSubsequentRecord(short sid) return
false on the first iteration of the method
findDataValidationTableInsertPos(List records).

This particular record is :
[PLV] (0x88B)
  rawData=[8B, 08, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 22, 27]
[/PLV]
And its SID is 2187.

I don't know what this record is.
Does that mean that this type of recird is not handled by POI yet ?

Thank you for your help,
Pierre

Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic