在Python中将Excel文件转换为HTML

Aspose.Cells - 将Excel文件转换为HTML

使用Python中的Aspose.Cells for Java将Excel转换为HTML,只需调用Converter模块的worksheet_to_html()方法。

Python 代码

 saveFormat = self.SaveFormat

workbook = self.Workbook(self.dataDir + "Book1.xls")

#Save the document in PDF format

workbook.save(self.dataDir + "OutBook1.html", saveFormat.HTML)

\# Print message

print "\n Excel to HTML conversion performed successfully."

下载运行代码

从以下任一社交编码网站下载将Excel文件转换为HTML(Aspose.Cells)