在将电子表格转换为HTML格式时渲染文字艺术的渐变填充
Contents
[
Hide
]
可能的使用场景
在Aspose.Cells 17.1之前, 当将Excel文件转换为HTML格式时, Aspose.Cells无法渲染字体艺术的渐变填充. 自Aspose.Cells 17.1发布以来, 字体艺术的渐变填充得到了支持. 以下截图比较了使用Aspose.Cells 17.1和旧版本转换Excel文件时的渐变填充效果.
在将电子表格转换为HTML时渲染WordArt的渐变填充
以下示例代码将source excel file转换为output HTML format. 源Excel文件中包含如上截图所示的带有渐变填充的字体对象.
示例代码
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); | |
// Read the source excel file having text with gradient fill | |
Workbook book = new Workbook(dataDir + "sourceGradientFill.xlsx"); | |
// Save workbook to html format | |
book.Save(dataDir + "out_sourceGradientFill.html"); |