Skip to content

Got tables? Use

Whether writing here or on Macworld, I often find myself relying on tables to convey lots of data points in an easy-to-read manner. As examples, check out the tables in my Nintendo add-ons pricing rant, or in my analysis on the cost of LED lighting. (Or even in my mother-of-all-tables post on OS X release dates.)

Tables play a key role in all of those articles…but creating tables in HTML (or even Markdown) is, quite simply, a pain in the butt. The syntax is simple enough, but structuring complex tables with some entries spanning multiple rows and/or columns can be time consuming.

Often, too, my work starts in Excel, and it seems like a lot of redundant effort to take Excel's table-based layout and recreate it in an HTML-based table layout. (Excel has an export to HTML function, but the HTML it builds is heavily styled and needs a lot of editing.)

Enter TablesGenerator, an amazing tool for creating tables. Not just HTML tables, but pure text tables, LaTeX tables, and even MediaWiki tables (whatever those might be).

Usage is about as simple as it gets: use the on-page menus and toolbar to create and style your table, click Generate, and then copy the resulting code. If you're building a table for use on another site with an existing theme, it's easiest to click the "Do not generate CSS" box before you generate the table. This will get you a plain HTML table, free of any markup.

But the real power lies in the File > Paste Table Data menu. Select that, then copy the tabular data from your worksheet and paste. Click Generate, then click Copy to Clipboard, and you're (pretty much) done. I've found that I may have to do a little tweaking to the output (usually to center spanned columns or rows), but the amount of work is way less than building the table from scratch.

Oh, and if you're one of those who insists that all data—even tabular data—should be styled by CSS, well, there's a table tool for you, too. I haven't used this one much (because tables simply make more sense as tables), but it's fun to see what it can do.