Author Topic: How To: Formatting a Table  (Read 12016 times)

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
How To: Formatting a Table
« on: March 06, 2014, 04:38:53 PM »
When copying a table from a spreadsheet, the formatting in the post is often "not good". 
For some tables, use of the "Insert Code" button (the # icon in the message toolbar) is sufficient. 
For other tables (e.g. budget discussions), even the Code approach can be lacking.

If you want something that looks better (and functions better if one wants to copy from the post and paste in a spreadsheet), the approach below will work:

1. Create table in Excel.  Select and Copy.
2. Go to TABLEIZER!.  Right Click in the large box and Paste.
3. Click the Tableize It! button
4. Click in the box under "Copy the HTML code below:"
5. Right Click and Copy
6. Open Notepad and Paste
7. Do the following edits
   -  Delete the lines from the top through the </style><table class="tableizer-table"> line
   -  Insert a line at the top (w/o quotes): "["table"]"
   -  Delete ‘ class=”tableizer-firstrow”’    (this should leave <tr> as the first four characters on the line)
   -  Replace all occurrences "h>" with "d]"    (Ctrl+H brings up the Replace menu in Notepad)
   -  Replace all "<" with "["
   -  Replace all ">" with "]"
   -  Replace all "&nbsp;" with ""  (in other words, delete all occurrences of "&nbsp;")
8. Select all and Copy
9. Go to the MMM forum post window where you are typing your entry and Paste.  It keeps all entries in the same columns they occupy in the original spreadsheet.

Looks complicated at first glance, but it took more time to type the steps above than it takes to do them. 

"It would be nice if" the TABLEIZER web site (or some other) provided output compatible with Simple Machines (the hosting engine for this forum) table formatting.  Tough to complain, however. about a free web site (TABLEIZER) that does a good job already (note: it's just something I found - I have nothing to do with it).  Similarly "it would be nice if" Simple Machines would accept html-style table commands, but again this forum does work well already.

One last caveat: if you have < or > in your Excel table, those will be converted to [ or ] using the steps above.

Others have found ways to make their tables more legible.  Don't know what the "best" way is but would be interested in opinions.

P.S. Moderators, if there is a better place for this, please move it.

rocksinmyhead

  • Handlebar Stache
  • *****
  • Posts: 1489
  • Location: Oklahoma
Re: How To: Formatting a Table
« Reply #1 on: March 10, 2014, 06:52:09 AM »
thanks for the tip! definitely didn't know about Tableizer.

Paulie

  • Guest
Re: How To: Formatting a Table
« Reply #2 on: March 29, 2014, 09:33:36 AM »
Great help! Thank you!

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #3 on: April 20, 2014, 09:56:34 AM »
See also http://forum.mrmoneymustache.com/forum-information-faqs/how-to-simple-step-by-step-guide-for-posting-formatted-table.  Requires going to two different web sites but eliminates the need for doing your own edits.  Thanks, enderland.

Getting closer - anyone know of a 1-step "convert Excel to SMF table" utility?  And as long as we're dreaming, could the SMF-compatible text be formatted as one line per row, instead of continuous text?

 


MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #4 on: September 29, 2014, 12:47:00 PM »
Also see http://forum.mrmoneymustache.com/journals/dandarc's-journal/msg367990/#msg367990 and several subsequent posts.  Yet another way to skin this particular cat.  DanDarc's method seems particularly applicable to spreadsheets which could get repeated use for posts.

dandarc

  • Walrus Stache
  • *******
  • Posts: 5457
  • Age: 41
  • Pronouns: he/him/his
Re: How To: Formatting a Table
« Reply #5 on: September 29, 2014, 01:30:19 PM »
You've got me thinking MDM - the biggest difficulty seems to be retaining the formatting.  Tabelize seems to just turn tabs into cell dividers, and new lines into row dividers - nice, but if you've got a nicely formatted sheet, you lose all that - good formatting definitely makes tables easier to read.

Clearly it is possible to cut and paste from Excel and retain formatting - for instance if you paste into Word or Outlook you can do this.  Wondering if there is a way to have those paste options even come up in the browser, or if plain-text paste is our only recourse.

Been meaning to see if I can write a working Android App on the side - maybe this would be a good project to start with.  Maybe - have lots on my plate, but this could be an interesting project.

kittenwhiskers

  • 5 O'Clock Shadow
  • *
  • Posts: 53
Re: How To: Formatting a Table
« Reply #6 on: September 11, 2015, 06:22:33 PM »
This is actually very helpful, and difficult to find without a link. Can we have someone add this (or a link to it) to the "presenting a case study" sticky in the "ask a mustachian" area? Thanks!

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #7 on: September 11, 2015, 09:50:16 PM »
This is actually very helpful, and difficult to find without a link. Can we have someone add this (or a link to it) to the "presenting a case study" sticky in the "ask a mustachian" area? Thanks!

Glad to hear that.  The link is...sort of...already there - but yes one has to look hard to find it.  In the sticky there are these lines:
Quote
This spreadsheet https://drive.google.com/file/d/0Bxe0EgraZFRBT2pGYjBEbG1qYlk/edit can be downloaded and used to help organize your case study posting.

It includes income, expense, and investment categories that will cover most situations.  For "not too complex" cases it will calculate IRS, SS, and Medicare taxes exactly, and state taxes approximately, helping one evaluate the after-tax effects of 401k, HSA, etc.  There is also a simplified section to evaluate "how long to FI?".

See this post and the spreadsheet itself for more details.

If you follow the "this post" link in the last sentence, it takes you to a post that includes
Quote
  3. Copy from Excel & paste into the post.  If you go this route, use any of:
      a. Column G of the "Posting" tab.  This is based on the idea given in http://forum.mrmoneymustache.com/journals/dandarc's-journal/msg367990/#msg367990.  Nice idea from dandarc - any implementation errors are mine.
      b. http://forum.mrmoneymustache.com/forum-information-faqs/how-to-formatting-a-table or
      c. http://forum.mrmoneymustache.com/forum-information-faqs/how-to-simple-step-by-step-guide-for-posting-formatted-table
so your table will be both easy to read and easy to import back into a spreadsheet. 

See?  Look - it's right there in item 3b - isn't it obvious? ;)

Swick is the owner of the case study sticky.  She may be amenable to editing that post and including some applicable language, particularly if you could draft said language.
« Last Edit: November 27, 2016, 07:55:17 PM by MDM »

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #8 on: October 27, 2016, 08:27:20 PM »
It appears the table formatting has changed (due to the recent forum software upgrade?).

Previously,
R1C1R1C2R1C3
R2C1R2C3
R3C1R3C2R3C3
would have displayed R2C3 in the second row under the R1C3 in first row, just as a spreadsheet would do with a blank cell in R2C2.

Can this functionality be restored?  New bbcode that one now should use?

ETA: Using the table - Online Manual example itself.
« Last Edit: October 28, 2016, 12:29:44 AM by MDM »

Cathy

  • Handlebar Stache
  • *****
  • Posts: 1044
Re: How To: Formatting a Table
« Reply #9 on: October 27, 2016, 11:55:37 PM »
Can this functionality be restored?  New bbcode that one now should use?

You won't be surprised to learn that I noticed this change as well (in addition to the other change I discovered). After all, I've long had a penchant for rolling my own block quotes by using tables. Each word in the preceding sentence links to a different post where I've done this, and those were all recent. There are literally hundreds of other examples in my posting history. Naturally, I was eager to find a new solution, and I did find one:
     
R1C1R1C2R1C3
R2C1R2C3
R3C1R3C2R3C3

(Isn't that cool? I used my block quote technique to offset a corrected version of your table!)

The trick here is my use of the "figure space" character, U+2007, which the new BBCode parser apparently does not strip out when used as whitespace in a table.
« Last Edit: October 27, 2016, 11:57:45 PM by Cathy »

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #10 on: October 28, 2016, 01:40:42 AM »
The trick here is my use of the "figure space" character, U+2007, which the new BBCode parser apparently does not strip out when used as whitespace in a table.
Thanks, that works!

A couple of notes for anyone else interested:
1) See https://en.wikipedia.org/wiki/Unicode_input.  I had to do the EnableHexNumpad registry change to use Alt+2007 to enter the character.
2) The "Post reply" editor removes the entire "[td][/td]" entry (whether there is nothing or a regular space between the ][) when one clicks "Post".  Although it may appear I "forgot" to enter a blank entry for the middle cell in my example table, rest assured it was there when "Preview"ed but disappeared when "Post"ed.

As this seems a Simple Machines bug, not a good new feature, I'll hold off revising all the automated posting cells in the case study spreadsheet in the hopes the bug will be fixed....

arebelspy

  • Administrator
  • Senior Mustachian
  • *****
  • Posts: 28444
  • Age: -997
  • Location: Seattle, WA
Re: How To: Formatting a Table
« Reply #11 on: October 28, 2016, 02:13:13 AM »
Can this functionality be restored?  New bbcode that one now should use?

I think it's built into the software, nothing I'm aware of to restore just that part of it, but keep the other upgrades/security patches.

As this seems a Simple Machines bug, not a good new feature, I'll hold off revising all the automated posting cells in the case study spreadsheet in the hopes the bug will be fixed....

I wouldn't count on that happening anytime soon, given it was almost exactly a year between previous forum updates (SMF 2.0.11 released Sept 18, 2015, SMF  2.0.12 released Sept 27, 2016).
I am a former teacher who accumulated a bunch of real estate, retired at 29, spent some time traveling the world full time and am now settled with three kids.
If you want to know more about me, this Business Insider profile tells the story pretty well.
I (rarely) blog at AdventuringAlong.com. Check out the Now page to see what I'm up to currently.

arebelspy

  • Administrator
  • Senior Mustachian
  • *****
  • Posts: 28444
  • Age: -997
  • Location: Seattle, WA
Re: How To: Formatting a Table
« Reply #12 on: October 28, 2016, 02:13:50 AM »
Thanks for finding a workaround Cathy!
I am a former teacher who accumulated a bunch of real estate, retired at 29, spent some time traveling the world full time and am now settled with three kids.
If you want to know more about me, this Business Insider profile tells the story pretty well.
I (rarely) blog at AdventuringAlong.com. Check out the Now page to see what I'm up to currently.

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #13 on: January 07, 2017, 03:28:38 PM »
As this seems a Simple Machines bug, not a good new feature, I'll hold off revising all the automated posting cells in the case study spreadsheet in the hopes the bug will be fixed....
I wouldn't count on that happening anytime soon, given it was almost exactly a year between previous forum updates (SMF 2.0.11 released Sept 18, 2015, SMF  2.0.12 released Sept 27, 2016).

"Soon" is in the calendar of the beholder, but it appears a fix is available.  See SMF 2.0.13 Released.  The highlighted item below should fix the table formatting.

Estimate of when this forum might be upgraded?  Thanks in advance.

SMF 2.0.13                                           January 4, 2017
===============================================================================
 ! Some file versions didn't get modified in the 2.0.12 patch
 ! Added check and sanitization for $_REQUEST['u'] in LogInOut.php and Reminder.php
 ! Added check and sanitization for $_REQUEST['uid'] in Reminder.php
 ! Properly sanitize author's website for packages
 ! Added session check when uploading packages
 ! Added session check when copying template files from one theme to another
! The code to remove empty BBCode was sometimes breaking things (reported by @rjen; fix provided by Sesquipedalian)
 ! Remove hardcoded limits for safe_unserialize as it was causing cache problems
 ! Update the cal_max_year setting to 2030

arebelspy

  • Administrator
  • Senior Mustachian
  • *****
  • Posts: 28444
  • Age: -997
  • Location: Seattle, WA
Re: How To: Formatting a Table
« Reply #14 on: January 07, 2017, 04:29:29 PM »
Estimate of when this forum might be upgraded?

It is now done.

It was quick because I was "subscribed" to this thread, so it only took me an hour to see the request, but if I wasn't, I'm not sure when I'd have seen this. I only catch up on all forum posts every few weeks to few months nowadays, and otherwise just read posts I'm subscribed to, and ones reported to mods--so if it's in a new thread, a PM may be quicker, in the future.  :)

Please test the table stuff you'd like to see, and let us know the results!  :)
I am a former teacher who accumulated a bunch of real estate, retired at 29, spent some time traveling the world full time and am now settled with three kids.
If you want to know more about me, this Business Insider profile tells the story pretty well.
I (rarely) blog at AdventuringAlong.com. Check out the Now page to see what I'm up to currently.

MDM

  • Senior Mustachian
  • ********
  • Posts: 11477
Re: How To: Formatting a Table
« Reply #15 on: January 07, 2017, 06:21:17 PM »
It appears the table formatting has changed (due to the recent forum software upgrade?).

Previously,
R1C1R1C2R1C3
R2C1R2C3
R3C1R3C2R3C3
would have displayed R2C3 in the second row under the R1C3 in first row, just as a spreadsheet would do with a blank cell in R2C2.

Can this functionality be restored?  New bbcode that one now should use?

ETA: Using the table - Online Manual example itself.

And now,
R1C1R1C2R1C3
R2C1R2C3
R3C1R3C2R3C3

it works again.

Speaking of again...thanks again!

arebelspy

  • Administrator
  • Senior Mustachian
  • *****
  • Posts: 28444
  • Age: -997
  • Location: Seattle, WA
Re: How To: Formatting a Table
« Reply #16 on: January 07, 2017, 06:33:31 PM »
No problem. Thanks for confirming it's working.  :)
I am a former teacher who accumulated a bunch of real estate, retired at 29, spent some time traveling the world full time and am now settled with three kids.
If you want to know more about me, this Business Insider profile tells the story pretty well.
I (rarely) blog at AdventuringAlong.com. Check out the Now page to see what I'm up to currently.