使用Aspose.Cells.GridDesktop在Excel文件中读取数据验证

在Excel文件中读取Aspose.Cells.GridDesktop中的数据验证

以下示例代码导入了包含GridDesktop中一些数据验证示例Excel文件

// 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");

将文件导入GridDesktop后,当我们尝试将A2单元格的值更改为大于100时,会弹出验证错误消息框