> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.carbone.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to keep merged rows inside a table loop?

# How to keep merged rows inside a table loop?

Carbone can't keep a merged rows when it is mixed with a loop of rows, the column will be transformed as a row on the generated report. This article is about creating a document that contains a table with merged columns mixed with loop of rows, such as:

![Table example with merge rows](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-05-17-at-22284_1nadzsm.png)

## Solution

Create a table inside a table, such as:

![Table of 2x2 inside a table of 2x1](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-05-17-at-17331_ubfw5.png)

When this table wrapping is created, it may also add some space between table (margin/padding). Follow the below instruction to remove it.

## Removing extra space for MS Word

It is possible to remove the margin space between the inner table and the cell, follow these instructions for MS Word:

0. Right-click on the table > "properties"
1. Select the tab "Table"
2. Click on the "Options..." button
3. Set the left and right margin at zero
4. Save

![Ms Word - Remove cell margin](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-05-17-at-17350_4plbqy.png)

## Removing extra space for Libre Office

Instructions for Libre Office:

0. Right click on the table > "table properties"
1. Select the tab "Borders"
2. Set the padding at zero
3. Save

![Libre Office - Update table padding](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-05-17-at-22332_7qmqbe.png)

Finally generate the report with Carbone and merged rows will render as expected, voilà 🎉