Renderizza una pagina PDF per ogni foglio di lavoro Excel Conversione da Excel a PDF con Node.js tramite C++

Contents
[ ]

Si prega di vedere il seguente codice di esempio che converte un file di Excel con più fogli di lavoro in PDF.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Initialize a new Workbook
// Open an Excel file
const workbook = new AsposeCells.Workbook(path.join(dataDir, "input.xlsx"));

// Implement one page per worksheet option
const pdfSaveOptions = new AsposeCells.PdfSaveOptions();
pdfSaveOptions.setOnePagePerSheet(true);

// Save the PDF file
workbook.save(path.join(dataDir, "OutputFile.out.pdf"), pdfSaveOptions);