Dear all,
I am trying to export a PDF file to Excel file (.xlsx or xls). The PDF fiel contains some tables and i need to process them.
I am programing in vb .NET.
I have used FormatProviders, but it always export to PDF.
I can't find the option to export to Excel format.
Is it posible?
do you have an example?
The code I have used:
Dim sampleFile As String = "C:\TEMP\RESERVA HIDRAULICA.pdf"
Using stream As Stream = New FileStream(sampleFile, FileMode.Open, FileAccess.Read)
Dim document As Telerik.Windows.Documents.Fixed.Model.RadFixedDocument = New Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider().Import(stream)
Dim dialog As SaveFileDialog = New SaveFileDialog()
dialog.Filter = String.Format("{0} files|*.{1}", "xlsx", "Xlsx")
dialog.FileName = "Result.xlsx"
If dialog.ShowDialog() = DialogResult.OK Then
Using saveStream As Stream = dialog.OpenFile()
Dim pdfFormatProvider As Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider = New Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider()
pdfFormatProvider.Export(document, saveStream)
End Using
End If
End Using
Thanks a lot,