Render One PDF Page Per Excel Worksheet - Excel to PDF Conversion
Contents
[
Hide
]
When working with large Microsoft Excel files (for example a workbook that has many sheets, each with 50 columns and 300 or more rows of data), you might want the PDF output to show one page per worksheet, regardless of the size of the worksheet. This would mean that each page is likely to have a radically different page size. This can be achieved by using Aspose.Cells for .NET.
Please see the following sample code that converts an Excel file with multiple worksheets to PDF.
If the OnePagePerSheet option is set to true, all the sheet content will be rendered to one PDF page.
If your spreadsheet contains formulas, it is best to call Workbook.CalculateFormula() just before rendering the spreadsheet to PDF. This ensures that the formula dependent values are recalculated, and the correct values are rendered in the PDF.