Link Search Menu Expand Document

Convert PDF To XLSX by pages - VB.NET

PDF Extractor SDK sample in VB.NET demonstrating ‘Convert PDF To XLSX by pages’

Imports Bytescout.PDFExtractor

Class Program

    Friend Shared Sub Main(args As String())

        ' Create Bytescout.PDFExtractor.XLSExtractor instance

        Dim extractor As New XLSExtractor()
        extractor.RegistrationName = "demo"
        extractor.RegistrationKey = "demo"

        ' Load sample PDF document

        ' Uncomment this line if you need all pages converted into a single worksheet:
        'extractor.PageToWorksheet = False

        ' Set the output format to XLSX
        extractor.OutputFormat = SpreadseetOutputFormat.XLSX

        ' No of Pages
        Dim pageCount As Int32 = extractor.GetPageCount()

        For i As Int32 = 0 To pageCount - 1
            Dim outputName As String = $"page_{i + 1}.xlsx"

            ' Save page to spreadsheet file
            extractor.SavePageToXLSFile(i, outputName)

            Console.WriteLine("'{0}' Created", outputName)

        ' Cleanup


    End Sub

End Class

Download Source Code (.zip)

Return to the previous page Explore PDF Extractor SDK