Renderizar una página de PDF por hoja de cálculo de Excel Conversión de Excel a PDF

Contents
[ ]

Consulte el siguiente código de ejemplo que convierte un archivo de Excel con varias hojas de cálculo a PDF.

from aspose.cells import PdfSaveOptions, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Initialize a new Workbook
# Open an Excel file
workbook = Workbook(dataDir + "input.xlsx")
# Implement one page per worksheet option
pdfSaveOptions = PdfSaveOptions()
pdfSaveOptions.one_page_per_sheet = True
# Save the PDF file
workbook.save(dataDir + "OutputFile.out.pdf", pdfSaveOptions)