Чтение Действительности данных в файле Excel с помощью Aspose.Cells.GridDesktop
Contents
[
Hide
]
Aspose.Cells.GridDesktop может читать и применять Проверки данных в вашем файле Excel. Загрузите свой файл Excel в GridDesktop, и все Проверки данных внутри него начнут работать, как в Microsoft Excel.
Чтение Действительности данных в файле Excel с помощью Aspose.Cells.GridDesktop
Следующий образец кода импортирует образец файла Excel, который содержит некоторые Проверки данных внутри 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"); |
После импорта файла в GridDesktop, если мы попытаемся изменить значение ячейки A2 больше 100, появится Окно сообщения об ошибке проверки.