将电子表格转换为 HTML 时渲染艺术字的渐变填充
Contents
[
Hide
]
可能的使用场景
Aspose.Cells 17.1之前,Aspose.Cells在Excel文件转HTML格式时,不渲染美术字的渐变填充。自Aspose.Cells 17.1版本开始支持艺术字渐变填充。下面的截图比较了使用Aspose.Cells 17.1和旧版本转换excel文件对渐变填充的影响。
在将电子表格转换为 HTML 时渲染艺术字的渐变填充
下面的示例代码将源文件进入输出 HTML 格式.源 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"); |