How to bulid table without borderline between row

Hi,

We would like to create a table which it doesn’t have border between the upper and bottom of the row. And the data in row should be looped using the Table in Aspose. And one more point is that we want the highest border still keep there, but the border between row removed. So how to design the template, so that we can archive this result?

I have attached the result for you to take a look. Please teach us how to set a template so that we can create a table like this.

Regards,
Ken Wan

Hi Ken,

Thanks for your request. I think in this case, you should insert two more rows in your table, one right after header and another before footer of the table. You should specify height of these rows to zero. This will allow you to disable borders of the data row. I created simple template for you. See the attached document. Here is code I used for testing:

// Create dummy datasource.
DataTable table = new DataTable("MyTable");
table.Columns.Add("col1");
table.Columns.Add("col2");
table.Columns.Add("col3");
table.Columns.Add("col4");
table.Columns.Add("col5");
table.Columns.Add("col6");
table.Columns.Add("col7");
table.Columns.Add("col8");
for (int i = 0; i <10; i++)
    table.Rows.Add(new object[]
    {
        "1",
        "48.804",
        "72",
        "48.876",
        "6.194",
        "72",
        "6.266",
        "$6.680"
    });
// Open temp[late and execute mail merge.
Document doc = new Document(@"Test001\in.doc");
doc.MailMerge.ExecuteWithRegions(table);
doc.Save(@"Test001\out.doc");

Best regards.

Hi,

We have tried this solution before. But problems occur when table excess pages more than one.
Attached picture shows the problem.

Regards,
Ken Wan

Hi Ken,

Thank you for additional information. In this case, I think, you can insert your main table into another table with only once cell and top and bottom borders enabled. I modified my template, See the attached document.
Hope this helps.
Best regards.