I am trying convert Excel file (attached) to pdf. Here is the code I use:
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim DataPath As String = MapPath(".") & "\Data\"
'Get the template excel file path.
Dim designerFile As String = DataPath + "InvestmentReview.xls"
'Specify the xml file path.
Dim xmlFile As String = DataPath + "InvestmentReview2.xml"
'Specify the pdf file path.
Dim pdfFile As String = DataPath + "InvestmentReview2.pdf"
Dim wb As Aspose.Cells.Workbook = New Aspose.Cells.Workbook()
wb.Open(designerFile)
wb.Save(xmlFile, FileFormatType.AsposePdf)
'Create a new Pdf object.
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()
'Now, Bind the xml file (Aspose.Pdf integrated), which is used as a medium file for conversion.
pdf.BindXML(xmlFile, Nothing)
'Save the pdf file.
pdf.Save(pdfFile)
End Sub
The new created pdf (attached) is does not reflect the original xls file. What am I doing wrong?
Thanks
Vlado