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

Free Support Forum - aspose.com

How to merge table cells using the Linq engine

I am using the Aspose.Words product to generate templates. Using the Linq reporting engine, we are attempting to create a table that has merged cells.

I am finding that when I have more than one <> tag on a row, the Aspose engine errors out saying that the foreach tag is not well formed.

The Table I am creating has hierarchical information. So the first row, first column would be a parent record, and may have multiple child records under it. I want the first row, first column to be a merge cell that spans all of the children that it covers.

Is there a way to have a table with Merged cells using the Linq reporting engine, which I am missing?

I have created a sample project and am attaching it to this ticket. If you run the attached project, it will pull up a form with a button to generate the document. Click that button, and it should open the generated document. It will lay out a table in the only way I can get it to work. Then below that, I have manually created a table of what I would like the output to look like.

Any help would be greatly appreciated.

BenAsposeTemplateGeneration.zip (5.4 MB)


We have logged your problem in our issue tracking system. Your ticket number is WORDSNET-17850. We will further look into the details of this problem and will keep you updated on the status of the linked issue.


The issue you have found earlier (filed as WORDSNET-17850) has been fixed in this Aspose.Words for .NET 19.1 update.

We have also modified the template document (see Sub Document.zip (12.5 KB)). Please use the updated template document (Sub Document.docx) to get the desired output. Hope, this helps.

The issues you have found earlier (filed as WORDSNET-17850) have been fixed in this Aspose.Words for .NET 19.1 update and this Aspose.Words for Java 19.1 update.


The “Merging Table Cells Dynamically” section of the documentation of LINQ Reporting Engine was added to describe the change.