New to Telerik Document ProcessingStart a free 30-day trial

Convert Xlsx to PDF

Updated on Jun 5, 2026

Environment

Product VersionProductAuthor
2021.2.511RadSpreadProcessingDimitar Karamfilov

Description

This article shows how to convert an XLSX file to PDF with the SpreadProcessing library.

Solution

Import the file with XlsxFormatProvider and export it with PdfFormatProvider.

Example 1: Convert XLSX to PDF

csharp
public static void ConvertXlsxToPdf(string path, string resultPath)
{
    var xlsxProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();
    var pdfProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.PdfFormatProvider();

    var docBytes = File.ReadAllBytes(path);
    var workbook = xlsxProvider.Import(docBytes);

    var resultBytes = pdfProvider.Export(workbook);
    File.WriteAllBytes(resultPath, resultBytes);
}

See Also