You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ralph Corby <rs...@live.co.uk> on 2008/05/12 12:53:44 UTC

Custom Data Validation Issue

Hi,
 
I have an Excel spreadsheet containing a cell that has custom validation applied to it.  The formula for the cell as displayed in the data validation dialog is:
 
=UPPER(C4)="X"
 
When I open the spreadsheet via POI (poi-3.1-beta2-20080507.jar) and then save it the formula is changed to 
 
=UPPER(A1)="X"
 
I've stepped through the code and it seems as if there's an issue using RefNVPtg.  I've looked at the contents of the RefNVPtg and it refers to a row of 0 and a column of 49152.  I'm guessing this is relative to another cell location but I can't see where this other location is stored. 
 
If I change the formula to an absolute cell e.g.
 
=UPPER($C$4)="X"
 
then poi uses the RefVPtg and everything works correctly.
 
Any suggestions - asides from changing all the cell references to absolutes!
 
thanks,
Ralph Corby
_________________________________________________________________
Win Indiana Jones prizes with Live Search
http://clk.atdmt.com/UKM/go/msnnkmgl0010000002ukm/direct/01/