Table Transformer failing to merge more than 2 tables
Asked by Hannah Sullivan:

Hi there,

I have roughly 150 pages of text filled tables (2 rows, 30 columns) created by an API call. Each is in a Table Excerpt macro. I am attempting to merge these into a single table on a separate page. I am using a Table Excerpt Include macro within a Table Transformer macro on the single separate page. The tables to be merged are identified by the table excerpt name (the same on each of the \~150 pages) and by the labels on the individual pages (the same for each of the \~150 pages). I have an indeterminate number of pages (but it is around 150 and could change in the future) which have the tables that need to be merged.

I have been using the basic merge function of the table transformer (SELECT \* FROM T\*).

On merging the tables on the separate page, two of the table excerpt include tables merge successfully (these would be the first two in the table if all merged correctly due to there numerical IDs, but are the not the first two tables which are added into the macro). The third table is transposed such that the original header row is transposed and added in the first column (creating 30 new rows), with the 2nd row being added as an additional new column. Each subsequent table is not merged and simply displayed as it would be in a simple table excerpt macro.   

Sadly, I cannot share screen shots to demonstrate exactly what the issue is.  

My columns header contains special characters of '\&' and ':' if these might make a difference - I have no experience of SQL - removing them does not seem to have made a difference however.  

Does anyone have any suggestions of what might be the issue and how I could go about fixing it?   

I have tried altering the table excerpt names, label names, the speed of API import, the excerpt type (page properties macro merges fine but changes the ordering of the columns which I can't have happen), and the header text to no effect


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Hannah Sullivan](/t5/user/viewprofilepage/user-id/4607991) ,

Please check what version of the [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=server) app is installed for your instance - the current one is 7.9.21. If you use an older one, please update the add-on.

Then you may try to exclude the Table Transformer macro from the case and merge the tables directly via the Table Excerpt Include macro: choose "Show as a report table" option. Please look for the details [here](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Excerpt+and+Table+Excerpt+Include+macros#HowtouseTableExcerptandTableExcerptIncludemacros-MergingTables).

And I also didn't understand the part about the third transposed table - it comes transposed out of nowhere during the merging process? Originally it looks like every other table? It is a very strange behavior for the macros.

If the issue persists, we'll still need additional information from you - please create a s[upport ticket](https://jsd.stiltsoft.com/servicedesk/customer/portal/2/user/login?destination=portal%2F2). All the information is confidential, so you can attach your screenshots and the page storage format (upper right corner of the page -\> menu ... -\> View storage format).

comments: author: Hannah Sullivan
body: Hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746)   

Thank for the reply!  

I on't actually know what version of the app is being used or how best to update, I will try to get someone to sort that in case that will resolve the issue.   

Yes, the third transposed table comes out of nowhere, but it's also the last table to be merged, all tables after that are displayed as their whole form in separate chunks (i.e. you see the header row, data/text row, and then a gap before the next table in the same format.)  

I will try to determine the app version and get it updated, but will certainly raise a support ticket if it persists after that.   

Thanks!


author: Katerina Kovriga {Stiltsoft}
body: Try to merge your tables via the Table Excerpt Include - maybe it could help the case.

And what do you see if you exclude the third table from the merging process? This transposed table breaks the tables' pattern and prevents other tables from merging correctly. Maybe something is wrong with this specific table? Its headers are not set correctly in HTML code or smth?


author: Hannah Sullivan
body: Hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746)  

The transposing happens regardless of the row that is third in the table, it just so happens that the third page to be incorporated results in the transposed table.

I am exploring the html of the table set up in case there is an error there, its why I wondered whether the having a header containing a '\&' character would result in problems.


author: Katerina Kovriga {Stiltsoft}
body: I assume that '\&' is used in every table you merge, not only in the third one that causes trouble.

If I try to merge tables with '\&', '\*' and other specific symbols in the headers, everything goes fine for me.

Please raise a support ticket and attach the page storage format (I've described it in the first answer) of the pages with a "good" and "bad" table. We'll recreate them on our test instance and look into the issue.


Tags: confluence-server

server