Break each row from a source table into a custom formatted Table
Asked by Curtis Baro:

### Confluence 8.8.1 {#toc-hId-2119650773}

<br />

Hello all,  
what im trying to do is take a single large source table with over 20 columns and some ever growing number of rows (100+ maybe?), then take each row and display the cell information as a table Similar to below.

My use case is really that some of the columns have a lot of information and the rows represent verification procedure information where the real source table goes way off the screen. I want to be able to transform that source table into something more readable when its exported into a PDF or document.

I dont have an issue with having to use the filter macro or something to isolate the row per entry, but I cant figure out any non-extremely manual way to take create some type of custom layout table where Im only updating the surrounding macros one time.

I could create the table format I want and in each cell manually use the table excerpt and table filter macros, but that would take so much time since there are potentially hundreds of procedures.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/320654i51D7CD487C50E5EC/image-size/large?v=v2&px=999 "Capture.PNG")


Answers:
author: Curtis Baro
body: Overall, the use case being asked for by me isnt something there is an easy way to do.  
Custom formatted tables where typical vertical or horizontal headers arent used is not a common use case.

For printable document use cases, best method found was to simply to use vertical headers and utilize some formatting stylesheets or macros for PDF or Word exports.

Thank you [@Stiltsoft support](/t5/user/viewprofilepage/user-id/5062270) for the advice.


author: Stiltsoft support
body: Hi [@Curtis Baro](/t5/user/viewprofilepage/user-id/5484535) ,

As you've mentioned the Table Filter macro, I guess you have the [Table Filter, Charts \& Spreadsheets for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-charts-spreadsheets-for-confluence?tab=overview&hosting=datacenter&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app.

So, you may keep your original table in the [Table Spreadsheet](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-spreadsheet-macro-83100938.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro (let it be Sheet1, for example) and then reuse the cells from the Sheet1 in the Sheet2 (like you do it in Excel). It will be much easier to create whatever structure you need for a presentation.

Also you may reuse your Sheet2 with the help of the [Table Spreadsheet Include](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-spreadsheet-include-macro-129895787.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro and display the result table wherever you need.

comments: author: Curtis Baro
body: Unfortunately this doesnt really work.

I was able to create a main table on sheet1 and then i kind of found a less manual way to copy that information to a new sheet though I dont like it because there would still be an annoying amount of copy paste.

the pics have my setup

(pic 1)  
1.1 my main table with all the columns where each row would be a procedure

1.2 the steps cell would need to be multiple lines which is already a pain to do in cells.

(pic2)

2.1 my formatted Table using the indirect reference combined with a row # on the left most section. I use the Heading (#, value) to do filtering on the confluence page.

2.2 I run into issues with copying the whole formatted section which is annoying but no the end of the world since I cant mostly (sometimes not?) copy the green row sections down.

2.3 I have weird issues though with the INDIRECT function (or other sheet refrences) where it does not update with the source cell. there are 2 results that I will get with that function.

2.3.1 it outputs old cell information (? below)

2.3.2 it outputs 0 when there are multiple lines in a cell

2.3.3 the X indicates me directly referencing the correct cell (=raw!M2)

(pic3)

3.1 Im using the INDIRECT function which works for all cells except the multiline ones.

3.2 I am using this function because me copying and pasting this over and over and updating 1 character is not a good use of time or long term usable. and since I cant drag the whole block down and just get it to auto-update

(Other things)

4.1 In order for the method of using the table on confluence I need to then extract the information in a useful way, I need to be able to select the entire custom format since the combination of multiple rows with header cells doesnt seem to be supported in any way I can figure out how to use.

4.2 its really clunky to have to use the spreedsheet editor for this type of documentation since thats not what the tool is for at all especially since the expected results needs some diagrams for some and I want to expand this raw table to include the results of the procedures (or at least be able to join the tables together).

![pic2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/320893iFA146567BF4E7FCF/image-size/large?v=v2&px=999 "pic2.PNG")![pic3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/320895i41DAE4C5986DD408/image-size/large?v=v2&px=999 "pic3.PNG")![pic1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/320894i6E201C8DA1655DA2/image-size/large?v=v2&px=999 "pic1.PNG")


author: Stiltsoft support
body: Hi [@Curtis Baro](/t5/user/viewprofilepage/user-id/5484535) ,

Yes, originally I meant just a simple reference from the first sheet to the second sheet. And indeed it takes a lot of manual work.

Maybe it is better to write a kind of a script that will take your source table and reorganize it.

And can you please share why you have such a use case. I mean that your source table is a real table (I mean, a real table like Excel considers it: a header row, consistent data in columns, no merged cells) and you are trying to transform it in the most non-tabular view. Is it for some presentation for your managers? Or you need some paper "cards" or smth to print?

As there are no any comments from other vendors and Confluence users, I guess that such cases are really rare.


author: Curtis Baro
body: [@Stiltsoft support](/t5/user/viewprofilepage/user-id/5062270)   
I think I will just go with left sided headers and 2 total columns since while taking up a lot of vertical space will likely provide a consistent conversion to PDF or word readable documents.

<br />

My use case really comes from a combination of my company documentation review process using another tool thats not confluence and my laziness of not wanting to rewrite documentation and such.

Since things like document template and formats arent decided by me or the team i work with, i want to be able to define larger raw tables that are only really usable on a webpage, then be able to more dynamically creates various documents in a variety of formats as needed without having to spend much time on reorganizing things manually.

Itll also be nice to be able to format pages such that they will be easy to view when printed out as there are many cases for that and being able to take a flat table and organize it into 'the new format and layout' will waste less of the teams time in the long term and allow us to create documentation that can be updated based on its actually configuration instead of documentation that has all possible options or manually updating it.

Truthfully what I would like is a Macro combination that has a single layout macro that defines the location and layout of content, then an input macro that takes a table and parses out the columns into the layout.  
something like the attached which i dont think exists (at least is not available to me)

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/321196iCFF86BA364F05FF5/image-size/large?v=v2&px=999 "Capture.PNG")


Tags: confluence-data-center

data-center

filter

table

table-filter

table-filter-and-charts

table-filter-charts-spreadsheets

table-spreadsheet