SyntaxHighlighter

Friday 10 August 2012

Paste a table into Blogspot / Blogger

Attempting a new approach of inserting a table into Blogger, I decided to try using a Macro in Excel to generate the HTML code.  As usual, someone else had beaten me to it and provided some ready to use code: http://dmcritchie.mvps.org/excel/xl2html.htm

To quickly get up to speed and have you table pasted into Blogger in under 5 minutes and in just over 10 steps by following these steps below:

1. Copy all the text from this page: http://dmcritchie.mvps.org/excel/code/xl2htmlx.txt
2. In Excel press Alt + F11 to bring up the macro editor
3. Select Insert > Module
4. Paste the text from 1. into the right hand window (if it is not displayed already, double-click "Module 1" in the left-hand pane.
5. I had to delete the first 8 lines to get the code to compile so I recommend you do the same.
6. Save the file - when the dialog box warns you about the file-type (in 2010) then select no and then go on to save the file.
7. Return to your Excel table - create the table if you haven't already
8. Highlight the table that you want to paste into Blogger
9. Press Alt + F8 to show the available macros, select XL2HTML and then press Run.
10. Save the txt file when prompted, but more importantly a webpage will pop up displaying the table, now highlight the table here and copy it.
11. Go to Blogger and in "Compose" view, paste the table.

In the future you can use the excel workbook again and again for creating HTML tables, you can jump right in at step 7.

If you would like help with any of the steps above, then do contact us at The PC Support Group on 0845 2233116

No comments:

Post a Comment