Reading Data Validations in Excel file using Aspose.Cells.GridDesktop
Contents
[
Hide
]
Aspose.Cells.GridDesktop can read and apply Data Validations in your Excel file. Please load your Excel file in GridDesktop and all the Data Validations inside it will start working as they do in Microsoft Excel.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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.