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

Free Support Forum - aspose.com

Setting rtf as cell value

Hello Support

I will like to create a table with 4 columns and variable rows depending upon numbers.
I used documentbuilder and able to generate the table with required columns and rows.
I could able to write text values but one of the column needs to load the filecontent which is rtf.
Please suggest what method I should use to write this content in cell. Earlier I was using Range.InsertFile method of word. I had checked the various insert method of documentbuilder but unable to find suaitable method.


Thanks in advance.

Hi Mandar,


Thanks for your inquiry. You can load RTF into a separate instance of Document class and insert it at any place in your main document. Please refer to the following article:
http://www.aspose.com/docs/display/wordsnet/How+to++Insert+a+Document+into+another+Document

I hope, this helps.

Best regards,

Hello Awais,
Thanks for the help, I tried the solution its working fine till 1339 when I am inserting one rich text document and and till 670 when I am inserting two rich text document.
What I am doing is I am creating table and while creating I am adding bookmarks in required cells where I want to have rich text content. I am then lopping the bookmarks and based on bookmark name I am inserting the document by using the method from the link.
On 1339 or 670 the entry I am getting error "There are too many styles in the document."
Please suggest.

Thanks in advance.

Hello Support,
Should I assume that this is some sort of limitation.
Thanks in advance.


Hello Support

Please not that, I am using rtf format which is not having any styles so the error seems to be different than what message I am getting. This is important for me because majority of content which will be added to document is of rich text format.
There will around 500 rows in table with atleast two fields with rtf data.

Is there any work around to this?

Regards
Mandar

Hi Mandar,


Thanks for your inquiry and sorry for the delayed response. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document (main document).
  • RTF document(s)
  • Aspose.Words generated output document (if any) which shows the undesired behavior.
  • Please create a standalone (runnable) simple console application (source code) that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Best regards,