Bug 45091 - Custom validation formula is corrupted by POI
Summary: Custom validation formula is corrupted by POI
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
: 45233 (view as bug list)
Depends on:
Reported: 2008-05-29 01:26 UTC by Ralph Corby
Modified: 2008-06-19 09:23 UTC (History)
1 user (show)

Sample excel spreadsheet that causes problem (13.50 KB, application/vnd.ms-excel)
2008-05-29 01:26 UTC, Ralph Corby

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Corby 2008-05-29 01:26:31 UTC
Created attachment 22027 [details]
Sample excel spreadsheet that causes problem

I have created a new workbook using Excel 2000.  I pick a cell, say C3, and apply custom data validation to it using the following formula


so that users can only enter x into the cell.  I then saved the workbook.

If I then read in the workbook into an HSSFWorkbook and then save it again the formula changes to


If the formula is changed to

=UPPER($C$3)="X" then the formula is not changed when the workbook is loaded into the HSSFWorkbook object.

I have seen this bug with the latest beta 3 build of poi (poi-3.1-beta3-20080529).
Comment 1 Josh Micich 2008-05-29 09:27:27 UTC
More problems following on from bug 44921.  tRefNV is being re-written as tRefN.
It might be time to correct the class hierarchy of ReferncePtg and RefN~Ptg.
Comment 2 Josh Micich 2008-06-06 18:08:06 UTC
Fixed in svn r664220.

This involved significant restructuring of the Ptg class hierarchy for a few purposes:
  - to stop instantiating superclasses
  - to combine the subclasses that were distinguished by 'operand class' only.  That structure did not make sense in the presence of the Ptg.setClass() method.
  - general clean-up of much dead/duplicated code.
Some previous bugs (bug 44636, bug 44921) have also provided incentive for these changes.
Comment 3 Josh Micich 2008-06-19 09:23:02 UTC
*** Bug 45233 has been marked as a duplicate of this bug. ***