在 Excel 到 HTML 转换时导出 DataBar、ColorScale 和 IconSet 条件格式
Contents
[
Hide
]
您可以在将 Excel 文件转换为 HTML 时导出 DataBar、ColorScale 和 IconSet 条件格式。Microsoft Excel 部分支持此功能,但 Aspose.Cells 完全支持此功能。
在 Excel 到 HTML 转换时导出 DataBar、ColorScale 和 IconSet 条件格式
以下屏幕截图显示了示例 excel 文件使用 DataBar、ColorScale 和 IconSet 条件格式。您可以下载示例 excel 文件从给定的链接。
以下屏幕截图显示了 Aspose.Cells 输出 HTML 文件,其中显示了 DataBar、ColorScale 和 IconSet 条件格式。如您所见,它看起来完全像示例 excel 文件.
示例代码
下面的示例代码将示例 excel 文件转换为 HTML 这只是一个正常的Excel到HTML的转换.
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); | |
// Specify the file path | |
string filePath = dataDir + "sample.xlsx"; | |
// Load your sample excel file in a workbook object | |
Workbook wb = new Workbook(filePath); | |
// Save it in HTML format | |
wb.Save(dataDir + "ConvertingToHTMLFiles_out.html", SaveFormat.Html); |