画像とチャートを含む XLS を PDF に変換します
Contents
[
Hide
]
Aspose.Cells は、画像とチャートを含む XLS ファイルの PDF ドキュメントへの変換をサポートします。 Aspose.Cells for Java は独立してスプレッドシートを PDF に変換できます: Aspose.PDF API は変換に必要ありません。
プロセスは一時または中間の XML ファイルに依存しないため、プロセスはメモリ内で実行できます。これは、画像、チャート、その他の描画オブジェクトを含む大きな Excel ファイルをすばやく効率的に変換できることを意味します。
スプレッドシートに数式が含まれている場合は、[Workbook.calculateFormula](https://reference.aspose.com/cells/java/com.aspose.cells/workbook#calculateFormula()メソッドを PDF にレンダリングする直前に実行します。これにより、式に依存する値が再計算され、正しい値が PDF にレンダリングされます。
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(ConvertXLSFileToPDF.class); | |
//Create a new Workbook | |
Workbook book = new Workbook(dataDir + "SampleInput.xlsx"); | |
//Save the excel file to PDF format | |
book.save(dataDir + "output.pdf", SaveFormat.PDF); |