You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/10/05 17:23:36 UTC
[Bug 53972] New: Cannot add data validation if XLS created in
Microsoft Excel for Mac
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Priority: P2
Bug ID: 53972
Assignee: dev@poi.apache.org
Summary: Cannot add data validation if XLS created in Microsoft
Excel for Mac
Severity: normal
Classification: Unclassified
OS: All
Reporter: mymuss@gmail.com
Hardware: All
Status: NEW
Version: 3.9-dev
Component: HSSF
Product: POI
Created attachment 29450
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29450&action=edit
Fix for DV exception if PLV records exists in XLS
At least in some cases Microsoft Excel for Mac adds a PLV record that is not
recognized by POI (record type 0x8C8). If that happens the
HSSFSheet.addValidationData() call throws the following exception:
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:311)
at
org.apache.poi.hssf.model.RecordOrderer.findSheetInsertPos(RecordOrderer.java:99)
at
org.apache.poi.hssf.model.RecordOrderer.addNewSheetRecord(RecordOrderer.java:93)
at
org.apache.poi.hssf.model.InternalSheet.getOrCreateDataValidityTable(InternalSheet.java:1629)
at
org.apache.poi.hssf.usermodel.HSSFSheet.addValidationData(HSSFSheet.java:371)
Reproducible in POI 3.8 as well as 3.9-beta1.
A patch that fixes the problem in 3.9-beta1 is attached.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Andrew Novikov <my...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mymuss@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Andrew Novikov <my...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Version|3.9-dev |4.0-dev
--- Comment #3 from Andrew Novikov <my...@gmail.com> ---
This issue still exists in 3.9 as well as 4.0-dev. I'm attaching a new patch
that now includes a unit test as well as a sample Excel file that breaks
unpatched builds of POI but passes on the 4.0-dev patched. The 3.9-dev patched
has been deployed to our production systems about six months ago and we hadn't
had of any issues since then.
I was unable to recreate the problem in a brand new spreadsheet so I'm
attaching one of the actual spreadsheets used in our application with sensitive
information redacted. The binary file is not in the diff, it's a separate
attachement, please put into test-data/spreadsheet/ directory.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Andrew Novikov <my...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29450|0 |1
is obsolete| |
--- Comment #5 from Andrew Novikov <my...@gmail.com> ---
Created attachment 30178
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30178&action=edit
Fix for DV exception when PLV record exists in XLS, includes unit tests
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> ---
Can you attach a file that results in the exception ? The proposed fix looks
good but I'd like to back it by a unit test.
Yegor
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
--- Comment #4 from Andrew Novikov <my...@gmail.com> ---
Created attachment 30177
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30177&action=edit
Sample spreadsheet that breaks unpatched version of POI for unit test.
Please put into test-data/spreadsheet/ directory before running unit tests.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> ---
changing status to NEEDINFO until a test file is provided
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53972] Cannot add data validation if XLS created in Microsoft
Excel for Mac
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Nick Burch <ap...@gagravarr.org> ---
Thanks, patch applied in r1496499.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org