在将Excel转换为HTML时,导出数据条、颜色刻度和图标集条件格式
Contents
[
Hide
]
导出数据条、色阶和图标集条件格式到HTML。在微软Excel中此功能支持有限,但Aspose.Cells for Python via .NET支持全部导出。
在将Excel转换为HTML时,导出数据条、颜色刻度和图标集条件格式
下面的截图展示了具有 DataBar、ColorScale 和 IconSet 有条件格式的sample excel file。您可以从给定的链接下载sample excel file。
下面的截图展示了 Aspose.Cells 输出的 HTML 文件,显示了 DataBar、ColorScale 和 IconSet 有条件格式。正如您所看到的,它看起来与sample excel file完全一样。
示例代码
以下示例代码演示了将示例Excel文件转换为HTML的过程,该过程属于常规的[Excel转HTML]。
This file contains hidden or 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
from aspose.cells import SaveFormat, Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Specify the file path | |
filePath = dataDir + "sample.xlsx" | |
# Load your sample excel file in a workbook object | |
wb = Workbook(filePath) | |
# Save it in HTML format | |
wb.save(dataDir + "ConvertingToHTMLFiles_out.html", SaveFormat.HTML) |