You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by toraritte November 21, 2023
What I would like to do:
Set cell value.
Check if the cell value conforms to the data validation rules referencing that cell.
I could extract all the information needed to create a validation function, but don't want to re-invent the wheel. I didn't find the NPOI docs yet (is it the source?), and based on my experiments, there is no such function, but perhaps I was looking in the wrong places.
As mentioned above, built-in Excel functions are not part of the Open XML SDK and so one would have to re-implement them in the framework itself. At least, this is how Apache POI's [DataValidationEvaluator][2] (source) works: after jumping through a bunch of hoops2, eventually FormulaParser.parse (source) will get called, and the validation evaluator will apply the subset of Excel functions implemented in Java or throw an error.
Discussed in #1217
Originally posted by toraritte November 21, 2023
What I would like to do:
I could extract all the information needed to create a validation function, but don't want to re-invent the wheel. I didn't find the NPOI docs yet (is it the source?), and based on my experiments, there is no such function, but perhaps I was looking in the wrong places.
Apache POI's
XSSFDataValidationConstraint
class does have avalidate
method, but the docs are not much help and I don't know Java:edit: Just found Apache POI's
DataValidationEvaluator
class and I presume thatNPOI.SS.Formula.DataValidationEvaluator
is the corresponding NPOI class. Am I on the right track?The text was updated successfully, but these errors were encountered: