Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging multiple tables into one #133

Open
kajto3 opened this issue Sep 28, 2022 · 0 comments
Open

Merging multiple tables into one #133

kajto3 opened this issue Sep 28, 2022 · 0 comments

Comments

@kajto3
Copy link

kajto3 commented Sep 28, 2022

I have 3 tables, each having the same amount of columns, but variable column headers and row amounts.
My goal is to create a single table that looks exactly like 3 tables printed one under another, but I would also like to keep the width of the widest row and headers with their separators/borders.
I keep my tables simplest as possible, this is an example:

 ALLIES     | ping |   xp 
--------------------------
 Statler    |    0 | 1068 
 Stangepork |    0 |  881 
 Scooter    |    0 |  667 
--------------------------
 AXIS     | ping |  xp 
-----------------------
 Wontkins |    0 | 977 
 Snerf    |    0 | 963 
 Animal   |    0 | 659 
-----------------------
 SPECTATOR      | ping | xp 
----------------------------
 SuperPlayerDE  |   48 |  0 
----------------------------

Expected result:

 ALLIES         | ping |   xp 
------------------------------
 Statler        |    0 | 1068 
 Stangepork     |    0 |  881 
 Scooter        |    0 |  667 
------------------------------
 AXIS           | ping |   xp 
------------------------------
 Wontkins       |    0 |  977 
 Snerf          |    0 |  963 
 Animal         |    0 |  659 
------------------------------
 SPECTATOR      | ping |   xp 
------------------------------
 SuperPlayerDE  |   48 |    0 
------------------------------

Another acceptable solution would be to keep 3 tables but somehow set a min width based on the widest row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant