Free Support Forum - aspose.com

Exception "System.ArgumentException: Not a legal OleAut date." occuring when trying to save workbook in AsposePDF format

Hi,

I am trying to convert an XLS file to PDF, but am unable to save the file in AsposePDF format. I am using the following code:

Workbook wb = new Workbook();
wb.Open(“Book1.xls”);
wb.Save(“temp.xml”, FileFormatType.AsposePdf);//<-exception is thrown here



Narrowing the problem down, I have found that this is occuring when some cells are encountered which contain a very large negative value, and have a custom date formatting (mmmm yyyy) applied, see (Book1.xls)

(I am using Aspose.Cells version 4.4.3.1, along with .NET Framework version v2.0.50727)

Hi,

Thanks for providing us the template file with details.

We will figure out the issue soon.

Thank you.

Any updates? Will it require a fix?

Hi,

Since it's week-ends now. We get back to you at the start of next week.

Thanks for being patient!

Hi,

Thanks for your patience.

Please try this fix.

It's caused by converting a negative numberic value to a date time value. We have fixed this bug.

Yes it is working now.

Thank you for the quick fix.