Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Are any of the popular Excel .NET projects have a functionality similar to Apache POI's DataValidationEvaluator class?
#3: Post edited
What I would like to do:1. Set a cell value.2. Check with a program if cell values conform to data validation rules.I could extract all the information needed to create a validation function, but I don't want to re-invent the wheel.What I have in mind is along the lines of how [NPOI](https://github.com/nissl-lab/npoi) allows recalculating all formulas to reflect changes in a workbook:```fsharplet recalculateFormulas (workbook: XSSFWorkbook) =let creationHelper = workbook.GetCreationHelper()let formulaEvaluator = creationHelper.CreateFormulaEvaluator()formulaEvaluator.EvaluateAll()```[1]: https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
- Are any of the popular Excel .NET projects have a functionality similar to Apache POI's [`DataValidationEvaluator`](https://poi.apache.org/apidocs/dev/org/apache/poi/ss/formula/DataValidationEvaluator.html) class?
#2: Post edited
How to programmatically validate a cell's value based on Excel data validation constraints?
- Which .NET project can programmatically validate a cell's value out of the box based on Excel data validation constraints?
- What I would like to do:
- 1. Set a cell value.
2. Check with a program if the cell value conforms to the data validation rules set for that cell.I could extract all the information needed to create a validation function, but I don't want to re-invent the wheel.---This question may be perceived as a duplicate of [Is there a way to programmatically evaluate Excel data validations using npoi in .NET?](https://stackoverflow.com/questions/74204029/is-there-a-way-to-programmatically-evaluate-excel-data-validations-using-npoi-in), but I tried to cast a wider net while also attempting to provide an answer.- [1]: https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
- What I would like to do:
- 1. Set a cell value.
- 2. Check with a program if cell values conform to data validation rules.
- I could extract all the information needed to create a validation function, but I don't want to re-invent the wheel.
- What I have in mind is along the lines of how [NPOI](https://github.com/nissl-lab/npoi) allows recalculating all formulas to reflect changes in a workbook:
- ```fsharp
- let recalculateFormulas (workbook: XSSFWorkbook) =
- let creationHelper = workbook.GetCreationHelper()
- let formulaEvaluator = creationHelper.CreateFormulaEvaluator()
- formulaEvaluator.EvaluateAll()
- ```
- [1]: https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
#1: Initial revision
How to programmatically validate a cell's value based on Excel data validation constraints?
What I would like to do: 1. Set a cell value. 2. Check with a program if the cell value conforms to the data validation rules set for that cell. I could extract all the information needed to create a validation function, but I don't want to re-invent the wheel. --- This question may be perceived as a duplicate of [Is there a way to programmatically evaluate Excel data validations using npoi in .NET?](https://stackoverflow.com/questions/74204029/is-there-a-way-to-programmatically-evaluate-excel-data-validations-using-npoi-in), but I tried to cast a wider net while also attempting to provide an answer. [1]: https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk