poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53965] New: XmlValueOutOfRangeException calling getDataValidations for custom validations with XSSFSheet
Date Thu, 04 Oct 2012 13:55:02 GMT

          Priority: P2
            Bug ID: 53965
          Assignee: dev@poi.apache.org
           Summary: XmlValueOutOfRangeException calling getDataValidations
                    for custom validations with XSSFSheet
          Severity: major
    Classification: Unclassified
                OS: All
          Reporter: sowen@cs.manchester.ac.uk
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: XSSF
           Product: POI

I've encountered a problem using custom Data Validations with XSSF sheets.
Adding the validation seems to work OK, but afterwards when I try
getValidations I get an XmlValueOutOfRangeException (full stack trace below).
The contents of the validation formula doesn't seem to matter, and things seem
to work correctly if I load a xlsx workbook containing custom validations and
then try to access them. Here is some simplified example code that demonstrates
the problem:

        XSSFWorkbook wb = new XSSFWorkbook();
        XSSFSheet sheet = wb.createSheet();
        sheet.getDataValidations();    //<-- works

        //create the cell that will have the validation applied

        DataValidationHelper dataValidationHelper =
        DataValidationConstraint constraint =
dataValidationHelper.createCustomConstraint("SUM($A$1:$A$1) <= 3500");
        CellRangeAddressList addressList = new CellRangeAddressList(0, 0, 0,
        DataValidation validation =
dataValidationHelper.createValidation(constraint, addressList);

        sheet.getDataValidations();    //<-- raised XmlValueOutOfRangeException

I also have the same problem when operating on an exisiting workbook that
contains sheets and cells, I've just simplified the code above.

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

View raw message