自定义Ribbon XML
Contents
[
Hide
]
自2007年以来,Microsoft Office通过在应用程序窗口顶部使用Ribbon替换了菜单和工具栏。Ribbon可定制。 Aspose.Cells允许您
- 保留Ribbon XML而无需解析它,
- 读取和写入Ribbon XML而无需解析它,
- 获取和设置Ribbon XML数据。
如果要更改Ribbon XML,则必须使用XML解析器或其他Ribbon XML工具解析它。
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 = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
Workbook wb = new Workbook(dataDir+ "aspose-sample.xlsx"); | |
FileInfo fi = new FileInfo(dataDir+ "CustomUI.xml"); | |
StreamReader sr = fi.OpenText(); | |
wb.RibbonXml = sr.ReadToEnd(); | |
sr.Close(); |