New to Telerik Document Processing? Start a free 30-day trial
Convert Xlsx to PDF
Updated on Jun 5, 2026
Environment
| Product Version | Product | Author |
|---|---|---|
| 2021.2.511 | RadSpreadProcessing | Dimitar 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);
}