将电子表格转换为 HTML 时渲染艺术字的渐变填充
Contents
[
Hide
]
可能的使用场景
早些时候,当电子表格转换为 HTML 格式时,Aspose.Cells API 无法呈现艺术字形状的渐变填充。现在 Aspose.Cells API 支持呈现艺术字形状的渐变填充。以下屏幕截图显示了 HTML 中的渐变填充效果,适用于以前和最近的版本。
在将电子表格转换为 HTML 时渲染艺术字的渐变填充
以下示例代码将源 excel 文件转换为输出 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-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getSharedDataDir(RenderGradientFillHTML.class) + "articles/"; | |
//Read the source excel file having text with gradient fill | |
Workbook wb = new Workbook(dataDir + "sourceGradientFill.xlsx"); | |
//Save workbook to html format | |
wb.save(dataDir + "out_sourceGradientFill.html"); |