将Excel转换为PowerPoint
Contents
[
Hide
]
Aspose.Cells for Python via Java支持将Excel(.xls, .xlsx, .xlsb, .xlsm)、CSV和OpenOffice(.ods)文件转换为PowerPoint文件。
将Excel工作簿转换为PPT
不需要再想着如何将Excel工作簿转换为PowerPoint,因为Aspose.Cells for Python via Java库已有最佳决策。Aspose.Cells for Python via Java API支持将电子表格转换为PowerPoint格式。要将工作簿导出为PowerPoint,请将SaveFormat.PPTX作为Workbook.save方法的第二个参数传递。您还可以使用PptxSaveOptions类指定导出工作表到.pptx文件的附加设置。
以下代码示例演示了将Excel工作簿导出为PPT。请查看代码以将source file转换为代码生成的Word文件。
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
import jpype | |
import asposecells | |
jpype.startJVM() | |
from asposecells.api import Workbook, SaveFormat | |
# Load Source Excel file | |
workbook = Workbook("sample.xlsx") | |
# Save the workbook as Word format | |
workbook.save("sample_out.pptx", SaveFormat.PPTX) | |
jpype.shutdownJVM() |