使用GridWeb的显示公式功能
Contents
[
Hide
]
有时,您需要找到一个简单的方法来处理包含公式的单元格。您需要一种方式来快速浏览所有公式,以检查错误。这可以帮助您跟踪公式中使用的数据。
Aspose.Cells.GridWeb提供了一个名为Microsoft Excel中的"显示公式"的功能。
使用显示公式功能
您只需要使用快捷键"CTRL + ~“即可在工作表中显示所有公式。
例如,我们将一个带有公式的模板文件加载到GridWeb中,以下是我们简单使用的代码加载文件。
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 | |
// Gets the web application's path. | |
string path = (this.Master as Site).GetDataDir(); | |
// Clear the sheets | |
GridWeb1.WorkSheets.Clear(); | |
// Load the file | |
GridWeb1.ImportExcelFile(path + "\\Articles\\source.xlsx"); |
文件加载到GridWeb中,我们可以在下面的图片中看到一个包含所有值的工作表。
按下CTRL + ~键后,所有公式都会显示。