Easily convert MS Word tables to clean HTML code
Apr 17, '07 07:30:00AM
Contributed by: outofcontrol
Recently I started a new contract, and the new people I work with like to create Microsoft Word tables. They send me these tables in a Word document, so that I can post them on their site as HTML tables in their CMS system. Having not done much work with Word, I set about to find a way to convert the Word table to a clean HTML format without requiring some expensive or large HTML editor. After much asking around, and searching, I accidently discovered this simple method using just Word and BBEdit:
- Select the entire table in Word and copy to the clipboard.
- Open a new document in BBEdit and past the copied clipboard into this new document. Here you will see that the table gets pasted in a tab-delimited format.
- Select Markup » Tables » Convert to Table. Adjust the preferences for the conversion as needed, and click on Convert.
You will now have a clean HTML table, ready to place into your page layout.
[robg adds: This hint was accidentally published yesterday before I had a chance to review it, hence the two existing comments dated from yesterday. I use Smultron extensively, but in contrast with the comment below, as far as I know it cannot handle the conversion of a text block to HTML table code. I also tested TextWrangler, and I don't think it will handle this conversion. I'm sure there must be other tools for this task, though, so if you know of them, please post.]
Comments (11)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070416092148864