poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Lavignotte" <pierre.lavigno...@gmail.com>
Subject UnknownRecord prevents to add DataValidation
Date Tue, 16 Dec 2008 14:47:45 GMT
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

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