Tuesday, January 8, 2013

HTML Table Generator using Microsoft Excel


Because I cannot find a better solution to generate cleaner HTML Table markups to my tabular data, so I created my own using Microsoft Excel.

The logic to create this tool

Of course I can just save my tabular data directly by Excel’s “Save as HTML” function. However, the generated HTML contains too many markups I cannot control.

Download this file

Download here!

How to use this tool

This tool is designed as maximum dimension at 40 rows by 26 columns. But it can be easily customized by adjusting TAGS/Shuffle/CAT sheets in the same workbook.

Step 1: Fill in all my tabular data in “Data” sheet.

Step 2: (Optional) Customize the styles of TH and TD elements.

Step 3: Select at ROWS sheet at a Column up to number of rows of Data, where the Column is at the number of column of Data.

Step 4: Copy, then paste to destination text file, enclosing with “<TABLE> </TABLE>” tag pair. Done!

Sample output markups

<tr><th style="background-color:green;padding-top:1em;padding-bottom:1em;color:white;"></th><th style="background-color:green;padding-top:1em;padding-bottom:1em;color:white;">OTV</th><th style="background-color:green;padding-top:1em;padding-bottom:1em;color:white;">FabricPath</tr>
<tr><td style="background-color:lightgreen;padding:.5em;padding-left:2em;padding-right:2em;">Encapsulation</td><td style="background-color:lightgreen;padding:.5em;padding-left:2em;padding-right:2em;">Over standard IP packets</td><td style="background-color:lightgreen;padding:.5em;padding-left:2em;padding-right:2em;">Over special frames</tr>



No comments:

Post a Comment