Free Support Forum - aspose.com

InsertHTML throwing exception "Input string was not in a correct format"

Hi,

I have a simple statement like,

Builder.InsertHtml( dr.getString(i) );

This is throwing the following exception,

System.FormatException

Message="Input string was not in a correct format."

The HTML returned by the datareader as input to insertHTML is

1. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Do Not Mail Accounts:  Exclude all SAANS having Suppression Code for no mail contact

(Suppression_Cd=1, 3, 5 or 7) on the VRES.ACCT2_V1 table:

1 - No mail contact for sales solicitation

3 - No mail or telephone contact for sales solicitation

5 - No mail contact for sales solicitation and do not mail work-at-home material/newsletter  

7 - No mail or telephone contact for sales solicitation and do not mail work-at-home material/newsletter

I'd appreciate if anyone could help me with this.

Thanks,

Kiran.

Dear Kiran,

I have tested the HTML sample that you have provided with the latest version of Aspose.Words (4.0.1) and it works ok. If there were any problem it looks like it was fixed in the new version. Please download and use the new version.

Best regards,

You must be right. I'm using an old version.

I'll get the latest version, thanks.

-Kiran.