Insert Html created in Word

I’m trying to insert an Html that was created in word using “builder.InsertHtml” and I’m getting a parse error.

The part of Html I’m trying to insert is of a table inside a table.

The "builder.InsertHtml"works for a table created in Html.

The general goal is to create a word document containing a complex table that contains tables (that contains tables).

Is it possible with ASPOSE? By inserting html to cells of the table or by creating tables inside a main table by ASPOSE code?

thanks,

Ophir

Please send us a document and part of the code that causes the error.

The most expedient way of nested table creation is using DocumentBuilder table insertion methods. The process is described in:

https://docs.aspose.com/words/net/programming-with-documents/

I am having this problem.

I am trying to convert HTML to Word document. I have been using ASPOSE components for over a year and have had no problems.

The problem comes when you copy and paste out of word. Word creates illegal HTML tags and I assume this is causing the following error:

input string was not in a correct format

Is the only solution to rewrite with valid HTML?

Hi,

You say, “Word creates illegal HTML tags”. Does this mean you try to import HTML produced by Word? If so, the only way is indeed to strip Word-specific tags because Aspose.Words does not handle them. If I misunderstood you, please elaborate your question.

I think you have understood correctly. I agree that the only thing you can do is to strip out the non-standard HTML tags.

Thanks. I just wish MS could keep things standard!