Convert PDF to Excel in C#, VB.NET

This article demonstrates how to convert a PDF file to Excel file format in C# and VB.NET by using Spire.PDF for .NET.

Below is the screenshot of the input PDF file:

Convert PDF to Excel in C#, VB.NET

Code Snippets:

C#
using Spire.Pdf;

namespace ConvertPDFToExcel
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a PdfDocument instance
            PdfDocument pdf = new PdfDocument();
            //Load the PDF file
            pdf.LoadFromFile("Shopping list.pdf");

            //Save to Excel
            pdf.SaveToFile("PDFToExcel.xlsx", FileFormat.XLSX);
        }
    }
}
VB.NET
Imports Spire.Pdf

Namespace ConvertPDFToExcel
    Class Program
        Private Shared Sub Main(ByVal args As String())
            'Create a PdfDocument instance
            Dim pdf As PdfDocument = New PdfDocument()
            'Load the PDF file
pdf.LoadFromFile("Shopping list.pdf")
'Save to Excel	
            pdf.SaveToFile("PDFToExcel.xlsx", FileFormat.XLSX)
        End Sub
    End Class
End Namespace

Output:

Convert PDF to Excel in C#, VB.NET