将Excel转换为HTML
Contents
[
Hide
]
将 Excel 转换为 HTML
Aspose.Cells for Python via Java API提供了将Excel文件转换为HTML文档的功能。为此,API提供了HtmlSaveOptions类,允许开发人员控制输出HTML的几个方面。
以下代码片段演示了使用HtmlSaveOptions类将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
source_directory = "Examples/SampleFiles/SourceDirectory/" | |
output_directory = "Examples/SampleFiles/OutputDirectory/" | |
save_options = HtmlSaveOptions(SaveFormat.HTML) | |
workbook = Workbook(source_directory + "Book1.xlsx") | |
workbook.save(output_directory + "ConvertingToHTMLFiles_out.html", save_options) |