Spreadsheet component + data validity

Hi there,

XSLX and Apache POI support checking validity of input (for example A2=ABS(ROUND(A2,2)) to check if positive number and 2 decimals rounding). Is this going to be implemented into the spreadsheets component?


Hi Sebastiaan,

I’m afraid DataValidation constraints aren’t considered right now.

You can create a new enhancement request in

I understand why, when you copy a cell on a cell with data validation in Excel or LibreOffice the data validation get’s lost on that cell. Setting a custom SpreadsheetComponentFactory might be the best solution for now.

Thank you for looking into it.

I just committed support for evaluating data validation constraints to POI trunk yesterday. See class org.apache.poi.ss.formula.DataValidationEvaluator. That has methods that could be used with a custom SpreadsheetComponentFactory to help you write your own validating input fields, including drop-downs.