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

Free Support Forum - aspose.com

Convert to PDF - Word having nested tables

We have a word document with nested tables. “Operation” table is the main table. Inside Operation table there are two nested tables “Class” and “Student”.

Class and Student table can have multiple rows spanning across multiple pages as well. We clone the Operation table to generate multiple operations with Class and Students programmatically in C#.Net MVC.



Issue is when there is not enough space at the bottom of page, we want the entire Operation table section should start with next page. In the attached screenshot example OP: 3 does not have space at the bottom and should be in next page.

Hi Douglas,

Thanks for your inquiry. Please read about ‘Keeping a Row from Breaking across Pages’ from here:
http://www.aspose.com/docs/display/wordsnet/Keeping+Tables+and+Rows+from+Breaking+across+Pages

If you still face problem, please share a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code you used to generate your output document. I will investigate the issue on my side and provide you more information.

We have a requirement to add 3 nested table in one main table in a Word document. Attached the sample document and following are the queries. Please let’s know how to achieve this programmatically.



1) The first table (Customer Details) will not have any border and can have two rows always

2) Remaining two tables will have borders. There can be N number of rows in these two tables

3) The main table can be repeated

4) There will 0.25” gap between tables

5) How to get the row height with dynamic text?

Hi Douglas,

Thanks for sharing the detail. In your case, I suggest you please use nested mail merge with regions. Please read the detail from here:
http://www.aspose.com/docs/display/wordsnet/Mail+Merge+with+Regions+Explained
http://www.aspose.com/docs/display/wordsnet/How+to++Execute+Mail+Merge+with+Regions
http://www.aspose.com/docs/display/wordsnet/How+to+Use+Nested+Mail+Merge+Regions

Regarding gab between tables and row height, you just need to create a template document with desired formatting and use mail mage with regions as explained in above links.

Please check “Mail-Merge” example project in Aspose.Words for .NET examples repository at GitHub. Hope this helps you. Please let us know if you have any more queries.