New to Telerik Document ProcessingStart a free 30-day trial

Convert Xlsx to PDF

Updated on Feb 19, 2026
Product VersionProductAuthor
2021.2.511RadSpreadProcessingDimitar Karamfilov

Description

This article demonstrates how you can convert a Xlsx file to a PDF with the SpreadProcessing library.

Solution

The solution is to import the file with the XlsxFormatProvider and export it with the PdfFormatProvider.

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);
    }
In this article
DescriptionSolution
Not finding the help you need?
Contact Support