https://issues.apache.org/bugzilla/show_bug.cgi?id=53965

          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: so...@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
        sheet.createRow(0).createCell(0);

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

        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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to