Reading Data Validations in Excel file using Aspose.Cells.GridDesktop

Reading Data Validations in Excel file using Aspose.Cells.GridDesktop

The following sample code imports the sample excel file which contains some Data Validations inside the GridDesktop.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Import sample excel file in GridDesktop
gridDesktop1.ImportExcelFile(dataDir + "ValidationTesting.xlsx");

After importing the file into GridDesktop when we try to change the value of cell A2 greater than 100 which pops up the Validation Error message box.