We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

XLS(with box drawing shape) to PDF converson failing


I am using the following code to convert XLS to PDF:

Workbook wb = new Workbook();

//Save the document in Aspose.Pdf.Xml format:
wb.Save(“C:\out.xml”, FileFormatType.AsposePdf);

Pdf pdf = new Pdf();
pdf.BindXML(“C:\out.xml”, null);
pdf.Save(“C:\out.pdf”); // < Error occurs here

But an error occurs:

“Unhandled Exception: System.ApplicationException: The reference paragraph for ParagraphRelative positioning is not found:Cell_0_1_0”

It seems to be occurring whenever there is a simple Box in the spreadsheet…(see Book2.xls)

I am using Aspose.Cells, and Aspose.Pdf with .NET framework 2.0.50727…


Thanks for considering Aspose.

I have tried converting your provided Book2.xls to pdf using Aspose.Cells v4.4.3.1 & Aspose.Pdf v3.6.2.0, i cannot see any error. Can you please check the value of 'files' that you have provided in BinXML method.

Sorry about the ‘files’, I had written the wrong code there, I have corrected it…

I tried with Aspose.Cells and did not receive the error either,

but the problem is that I have to use Aspose.Cells as it contains a fix for another error that I was encountering (Exception &quot;System.ArgumentException: Not a legal OleAut date.&quot; occuring when trying to save workbook in AsposePDF format)…

I guess this error is popping up when using Aspose.Cells only


I will move this thread to Aspose.Cells forum. They will reply to you soon.


Please try our latest version( http://www.aspose.com/community/files/51/file-format-components/aspose.cells/entry133353.aspx I tested using your template file and it works fine without generating any error.

Thank you.

Tried with and still getting the same error :frowning:


I don't find any problem, I used Aspose.Cells 4.5 and Aspose.Pdf Atached is the resultant .pdf file, kindly check it. Please make sure that your project is using 4.5. or greater version. If you still could not sort out, make a test project, zip it (containing all the files) and post it here, we will check it soon.

Thank you.

OK tried with latest version of Aspose.Cells and Aspose.Pdf and it worked out…thanks…