Adding dynamic columns to static tables in templates

Hello,
I need to be able to create duplicate columns in a formatted table in the template :
So in the following example column Table1ValueX may be repeated 1 to X times and I will only the value of X at run time.

Item No Name 1
«TableStart:Table1»«Table1Name» «Table1ValueX» «TableEnd:Table1»
Totals

Also, we want the users to be able to apply any formatting to the column in the static template and this formatting should be copied into the new dynamically created column.
Could you please let me know if this can be done and what the best way of doing this would be. I have cloned a cell and appended it to the table but the formatting of the cell has been lost in the dynamically created cell.
Many thanks,
Barsana

Thanks for your inquiry. I will try to compose a working code example for you and post it here in a short time.
Best regards,

Hi
I checked duplication of columns using following code example and formatting of duplicated column were the same as before duplication.

private void DuplicateColumn(Table table, int colIndex, int numberOfCopies)
{
    foreach (Row row in table.Rows)
    {
        for (int i = 0; i < numberOfCopies; i++)
            row.Cells.Insert(colIndex + 1, row.Cells[colIndex].Clone(true));
    }
}

If your problem hasn’t been solved, could you please send us your document and a source code? Also please describe what kind of formatting lost during duplication. We’ll try to reproduce your problem and do our best to solve it.