Excel formats
XLSX, XLSM, XLTX, XLTM, XLS and XLT, the Excel 2003 XML spreadsheet, CSV and tab separated values, and Markdown, whose tables become worksheets.
Convert Excel workbooks to PDF from C# and VB.NET without Microsoft Excel: XLSX, XLSM, XLTX, XLTM, XLS and XLT, comma and tab separated values, the Excel 2003 XML spreadsheet and Markdown tables. Every visible sheet is converted as Excel prints it, by a spreadsheet engine in the library, on Windows, Linux and macOS.
The Excel to PDF converter is part of ExpertPdf Anywhere, the .NET library with every ExpertPdf tool. Fit a sheet on one page, convert only some sheets, and get a bookmark for each sheet.
Documentation · Online samples · NuGet · Download .zip (v22.0.0) · Excel to PDF docs · Excel to PDF online sample
Which sheets are converted and how they are printed, and how the PDF document comes out.
Workbooks from a file, a stream or bytes, printed without Microsoft Excel.
XLSX, XLSM, XLTX, XLTM, XLS and XLT, the Excel 2003 XML spreadsheet, CSV and tab separated values, and Markdown, whose tables become worksheets.
Every visible sheet in workbook order, with its print area, its page breaks and its own printed header and footer.
Worksheets converts only the sheets it names, for example "Summary, Q1"; PageRanges only some pages.
Each sheet becomes a bookmark of the PDF document, with SheetBookmarks.
Empty sheets and empty pages are left out, or kept with ConvertBlankSheets and ConvertBlankPages.
Open a password protected workbook with Password. A workbook that cannot be read throws ExcelConvertException.
The paper of each sheet or your own, scaling, gridlines and standards.
Each sheet on the paper size, orientation and margins of its own page setup, or all of them on the page size and margins you set.
The whole sheet, all its columns or all its rows on one page, with Layout.
Draw or hide the cell gridlines with GridLines, whatever the sheet sets.
Arabic, Hebrew, Thai and other complex scripts the workbook does not mark are shaped with AutoDetectComplexScript.
PDF/A and PDF/X documents, and tagged PDF/UA documents with the sheets' tables and header cells, and the alternative text of charts and pictures.
Form controls kept as PDF form fields, a header and a footer with page numbers, passwords and permissions, as in the HTML to PDF converter.
Create a PdfConverter from ExpertPdf.Anywhere.ExcelToPdf, set the options and call one conversion method. The tabs fit a workbook's columns on landscape A4 pages, convert two named sheets, and a CSV file.
using ExpertPdf.Anywhere.ExcelToPdf; var converter = new PdfConverter(); // converter.LicenseKey = "your license key"; // Landscape A4 pages, all the columns of a sheet across one page converter.PageSetup = ExcelPageSetup.Options; converter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4; converter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Landscape; converter.Layout = ExcelLayout.FitAllColumnsOnOnePage; converter.GridLines = ExcelGridLines.Visible; converter.SavePdfFromExcelFileToFile("sales.xlsx", "sales.pdf");
Install the package of your operating system, dotnet add package ExpertPdf.Anywhere.Windows
(or .Linux, .Linux.Arm64, .MacOS); it brings the ExpertPdf Anywhere library with it. The
Excel to PDF topic describes every option, and the
online sample converts your own workbook.
Also in ExpertPdf Anywhere: Cross-platform HTML to PDF, Word to PDF, PowerPoint to PDF, PDF to Word, PDF to Excel, PDF to PowerPoint, and every other ExpertPdf tool.
Common questions about formats, sheets, page setup and licensing.
ExcelFormat to set it (tab separated values and Markdown given as a stream must name it).ExcelPageSetup.Options the sheets are laid out on the page size, orientation and margins of PdfDocumentOptions.Worksheets converts only the sheets it names, for example "Summary, Q1", and PageRanges only some pages. Each sheet becomes a bookmark of the PDF (SheetBookmarks).Layout: FitAllColumnsOnOnePage fits all the columns of a sheet across one page, FitAllRowsOnOnePage all its rows, and FitSheetOnOnePage the whole sheet. GridLines draws or hides the cell gridlines.PdfStandardSubset produces PDF/A and PDF/X documents, and AccessibilityStandard tagged PDF/UA documents: the sheets' tables with their header cells, charts and pictures with their alternative text, and links. Set Language and the title for an accessible document.ExpertPdf.Anywhere.Fonts package.Install ExpertPdf Anywhere from NuGet and try every feature in evaluation mode. License it on the pricing page when you are ready.