ExcelをPDFにレンダリングする際にスライサーを描画する
Contents
[
Hide
]
ExcelをPDFにレンダリングする際にスライサーを描画する
既存のExcelファイルにスライサーが適用されている場合、その設定を維持してExcelをPDFにエクスポートしたい場合、Aspose.Cells for Node.js via C++はデフォルトでこれをサポートします。スライサーを適用したExcelファイルをPDFにエクスポートすると、スライサーの設定も反映されます。
次のサンプルコードは、既存のスライサーが含まれるsample Excelファイルを読み込みます。その後、ワークブックをoutput PDFファイルとして保存します。次のスクリーンショットは、元のExcelファイルと生成されたPDFファイルを比較しています。
サンプルコード
This file contains hidden or 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
const AsposeCells = require("aspose.cells.node"); | |
// Load sample Excel file containing a table. | |
var workbook = new AsposeCells.Workbook("SampleSlicerChart.xlsx"); | |
// Save the workbook to pdf format. | |
workbook.save("SampleSlicerChart.pdf", AsposeCells.SaveFormat.Pdf); |