How to do tables

dub_nerd

Registered User
Messages
1,985
upload_2015-2-4_15-30-2.png

Introduction

KBC3.5%100,000 EUR
Nationwide UK (Ireland)4.00%100,000 EUR


Tabular data crops up everywhere, and you sometimes want to use a neat table format in your posts. To put the above table in your post, you type the following into the editor -- don't worry about the ugliness, I'm going to give you a really easy way to create this shortly, so the following is only by way of explanation of the format.

Code:
[table][tr][td]KBC[/td][td]3.5%[/td][td]100,000 EUR[/td][/tr]
[tr][td]Nationwide UK (Ireland)[/td][td]4.00%[/td][td]100,000 EUR[/td][/tr][/table]

The whole table is surrounded by [table] and [/table] tags. Inside that, the rows are surrounded by [tr] table row tags, and the individual cells by [td] table data tags. The whole thing is continuous without line breaks.


upload_2015-2-4_15-30-2.png

Tables the Easy Way

As I said, you don't want to have to type all this by hand. Let's look at an easier way. Go to this page: theenemy.dk/table/ and follow the instructions. At step 2), type your table data into the text box, with cells separated by semicolons and rows split across lines:

upload_2015-2-4_15-21-19.png


Click the Advanced Options link and change the column separator from Tabulator to Semicolon:

upload_2015-2-4_14-52-45.png


Select the "Header Row" option if you want it. Then click the button at step 4 and your "ready to use table" can be just copied/pasted into your forum post from the text box at step 5.

upload_2015-2-4_14-54-31.png


It's as easy as that. Make sure your actual table data doesn't contain any semicolons or these will be confused with column separators. If necessary, there is an option to use Commas instead of Semicolons.


upload_2015-2-4_15-30-2.png

Copying tables from other programs

Maybe you've already typed your table data somewhere else, such as a table in MS Word or Excel, or it is available as a table on another web page. The approach is exactly the same as before -- use the handy page at theenemy.dk/table/ -- but this time instead of typing the data in by hand, you copy and paste it from your spreadsheet or other source.

For instance, select and copy from Excel:
upload_2015-2-4_15-5-48.png


Where you previously typed your table into the web page by hand, now paste into the same text box:

upload_2015-2-4_15-7-6.png


You will notice that the separators between columns look different. These are tab marks, so under Advanced Options make sure you have Tabulator selected:

upload_2015-2-4_15-9-43.png


Tabulator is the default, so unless you changed things previously you don't have to click Advanced Options at all.

Now follow the rest of the steps as before. Click the button at step 4 and your "ready to use table" can be just copied/pasted into your forum post from the text box at step 5.

upload_2015-2-4_14-54-31.png


Once again, copy and paste the resulting table into your forum post.


upload_2015-2-4_15-30-2.png

Pasting a Table as a Picture

A quick and dirty way of getting a table into a post is by simply "screen-shotting" (by any of a variety of methods) from the table source into your post e.g. this screen-shot from Excel:

upload_2015-2-4_15-15-23.png


This way of doing things isn't recommended, because other people can't select and copy your data in order to use and manipulate it themselves.


upload_2015-2-4_15-30-2.png

Advanced Table Formatting

If you are comfortable with editing a basic table in BBCode, you can mix any other normally allowed formatting into table contents, such as coloured cells and even images:

BankRateInsurance
KBC3.5%100,000 EUR
Nationwide UK (Ireland)[broken link removed] 4.00%100,000 EUR
 
Last edited:
You can also prepare and format table data from scratch using this link.

I think that most people will take one look at the codes, and they will stop reading.

I prepared the above extract from the link at the bottom of the page.

I think it might be worth promoting this to the top. Most people will input tables themselves from their own personal data e.g.
.TotalHomeInvestment 1Investment 2
Value of property900 k300k200k400k
Mortgage 700k100k300k300k
Equity€200k€200k-€100k€100k
Interest rate.ECB +1%4.5%5%
Rent ..€600 per month€1,000 per month



Any idea why the big blank spaces appeared before the tables?
 
Last edited:
I copied the table from the above post and put it into theenemy.dk/table/:

. Total Home Investment 1 Investment 2
Value of property 900 k 300k 200k 400k
Mortgage 700k 100k 300k 300k
Equity €200k €200k -€100k €100k
Interest rate . ECB +1% 4.5% 5%
Rent . . €600 per month €1,000 per month
 
Hi Brendan, I updated the top post to move the easy "create table from scratch" web page to the intro. I agree the BBCode is scary, so you're right -- the first point should be to note that you can generate it for free.

Your blank line problem is caused by formatting like this:

Code:
[table]
[tr]
   [th]Rank[/th]
   [th]Name[/th]
   [th]Sex[/th]
[/tr]
[tr]
   [td]1[/td]
   [td]Jeanne Calment [/td]
   [td]F[/td]
[/tr]
[tr]
   [td]2 [/td]
   [td]Sarah Knauss[/td]
   [td]F [/td]
[/tr]
[/table]

The "Free BBCode generator" puts in all those blanks lines, but you have to remove them from your table definition to avoid blanks in the post. I covered this known issue in the top post.
 
I suggest the following edit

Code:
[table]
[tr]
[th]Rank[/th]
[th]Name[/th]
[th]Sex[/th]
[/tr][/table]

will give you a lot of blank lines before the table

RankNameSex
 
So put everything between the "tr" and "/tr" on one continuous line as follows:

Code:
 [table] [tr] [th]Rank[/th] [th]Name[/th][th]Sex[/th] [/tr][/table]
will give you
RankNameSex
 
Sorry dub-nerd

I think that the whole post needs to be rewritten! I have just discovered such a simple way to do tables.

http://www.askaboutmoney.com/thread...sell-investment-property.191442/#post-1414528

Brendan
You mean by screenshotting Excel or some other source? I thought about including that originally, but decided that:
  1. A user attempting tables probably knows about screenshots and posting images.
  2. It's not the same thing -- you can't copy and paste the table data off the screen. For instance, in your linked post, I couldn't easily post a suggested correction by modifying your data (unless you also attached the source data, not an image).
  3. You won't get the same consistency of formatting

I think at most what we need is a one sentence addendum saying: "You can post a screenshot, but bear the following limitations in mind ... etc". Then there could be a link to another how-to page on posting screenshots.
 
Last edited:
Hi dub

I spent ages on Monday doing tables for the mortgage best buys using the table generator.

When I went to answer that question today, I was dreading all the work involved. So I said to myself that I would do it in Word first, which is very easy. Easy to insert another column or line. Easy to highlight. Very easy to format.

Then I thought of Jing and it was brilliant.

The only downside is the maintenance of best buy tables. I won't be able to edit them online. I will have to update the table in Word and then paste it in.

Brendan
 
Hi Brendan,

How about I make you an offer you can't refuse. :)

I think pasting tables as images isn't a great idea in general. It stops other people from copying and modifying or re-using the data. I know I scrape data off webpages all the time and make graphs that the original authors might not have intended. Obviously, if you want to save yourself effort and are certain that the data won't be useful to anyone else, there's nothing stopping you using an image.

I have another approach to add to the arsenal of tools. Attached is an Excel file I wrote called bbcode.xlam (must be extracted from zip). When you download, extract, and double-click it, it installs an Excel add-in that gives you a 'bbcode' function. This lets you turn any rectangular region in Excel into a bbcode table, and preserves number formatting, bold/italic/underlined font styling, and left/centre/right justification. Here's an example of use:

Ax3He80.png


Set up your table, with required formatting. In any cell in the spreadsheet, type =bbcode( ... then select your table range by dragging across it, and close the bracket. Tab off the cell, and it becomes the required bbcode text. Arrow back onto the cell and hit Ctrl-C to copy the text, then paste it into a post:

WNvWuXn.png


Here's the result of copy/pasting the code:

ItemPrice

Sausages
€1.95

Beans
€0.89

Milk
€1.40

Total
€4.24

With this approach you don't have to go searching for an online table service, and you get better preservation of formatting. Let me know what you think. The add-in may issue a dire warning about security when you first install it. If people would prefer the VBA code so that they can enter it themselves instead of installing an add-in I have also attached that as a text file.

(Notes: if you change your table in Excel after creating the =bbcode cell, you must recreate it -- Excel won't automatically update the cell. There is an optional second parameter to bbcode which you can see in the above example:
EbNt5EL.png
; setting it to 1 or true makes the first row a bbcode header).
 

Attachments

  • bbcode.zip
    15.7 KB · Views: 593
  • bbcode.txt
    2 KB · Views: 501
Last edited:
Wow!

dub nerd, you really have been burning the midnight oil. Thanks.

That sounds great, but does not work for me. Target the instructions at someone like me with very little technical competence.

1) I clicked on bbcode.zip
2) A dialogue box opened saying "Opeing bbcode.zip"
3) I selected "Open with Windows Explorer(default)
4) A Windows Explorer (Not Internet Explorer) screen opened
5) There is an item called bb code described as Microsoft Excel Add-In
6) I double clicked
7) A security Notice appeared
8) I clicked on Enable Macros
9) Excel opened
10) I clicked on File New Workbook
11) I opened a new workbook
12) I set up a simple table
13) I clicked on a blank cell somewhere else in the workbook
14) =bbcode( appeared
15) I highlighted the table
16) I entered it into the formula
17) I put in a ) at the end of it

And now my problems start . I got a message

"We found a problem with the formula..." with an option of OK and Help

18) I tried again
19) I typed =bbcode(
20) I highlighted the table and e7:g10 appeared
21) I typed in the )
22) I tabbed off the cell
23) I clicked back on the cell
24) I right clicked
25) I pasted

MenWomen
Number1020
age1820
Height65
 
OK, I got it to work after a while.

I have no idea what this means though.

(Notes: if you change your table in Excel after creating the =bbcode cell, you must recreate it -- Excel won't automatically update the cell. There is an optional second parameter to bbcode which you can see in the above example:
EbNt5EL.png
; setting it to 1 or true makes the first row a bbcode header).

carshorses
number1020
cost20001000
 
I started from scratch - and it didn't work for me.

1) Do I have to go through steps 1- 8) every time I want to do a table?

I would certainly be prepared to learn all this as I do tables all the time. And I accept that the result is better than an image.

But Jing seems at this stage a lot easier - mind you that's probably because I spent 20 minutes installing Jing.
 
Hi dubnerd

Just thinking about it over my breakfast...

How about I do a table in Excel.
Copy the image into the body of the post in Askaboutmoney
and attach the Excel spreadsheet to the post.

Then anyone who wants to extract data from the post can do so.

Brendan
 
I started from scratch - and it didn't work for me.

1) Do I have to go through steps 1- 8) every time I want to do a table?

I would certainly be prepared to learn all this as I do tables all the time. And I accept that the result is better than an image.

But Jing seems at this stage a lot easier - mind you that's probably because I spent 20 minutes installing Jing.

Hi Brendan, first of all well done for getting it to work at all. I think we've already established I'm not a very good explainer :oops:. Second of all, I was slightly winging it -- this is all pretty much new to me as well. Thanks for being the guinea pig. I believe the following is how you need to proceed -- it seems the add-in gets installed but you have to permanently enable it. So:


  1. Launch a new empty Excel worksheet
  2. Choose File->Options
    nJQ0mfV.png

  3. On the Excel Options window, choose "Add-Ins" from the menu down the left
  4. At bottom of that screen select Excel Add-Ins and press Go... button
    L9Xg4mK.png
  5. You should see a list that includes BBCode add-in
  6. gN9cjBF.png
  7. Click the checkbox beside Bbcode add-in to enable it and click OK

The add-in should now be permanently enabled and you will be able to use it in your spreadsheets.
 
Back
Top