Python の Excel を PDF ファイルに変換する

Aspose.Cells - Excel から Pdf への変換

Python の Aspose.Cells for Java を使用して Excel を Pdf ファイルに変換するには、単に Excel を呼び出します。_に_Converter モジュールの pdf() メソッド。

Python コード

 saveFormat = self.SaveFormat

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

# Save the document in PDF format

workbook.save(self.dataDir + "OutBook1.pdf", saveFormat.PDF)

\# Print message

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

実行中のコードをダウンロード

ダウンロード**Excel を PDF に変換する (Aspose.Cells)**以下のソーシャルコーディングサイトのいずれかから: