Pages

Wednesday, 1 March 2006

Tip: convert Word to HTML, and convert Excel and PDF to HTML too, free






I just realised there's an easy free way to convert Microsoft Word DOC, Excel XLS or Adobe Acrobat PDF documents into nice clean HTML for your website or web pages.

Just email the file to yourself at your Gmail address (now anyone can sign up for Gmail free), login to Gmail, open the email, click to view the attachment as HTML, view the source of the new window that pops up, and copy and paste the HTML code to use for your webpage. [Added 10 March 2006:] Thanks to LilacPhonograph for adding (see comment) that your Gmail/Google Mail display language must be set to English US (Settings, General tab), if you can't see a View as HTML option.

There may be a bit of search/replace to do after that in order to to get rid of some fonts from the original DOC file (e.g. the face="whatever" code), and perhaps some other tidying will be needed, but it's a lot better than trying to convert Word docs into HTML from within Word itself, which just produces lots of horrid messy Microsoft-specific code. And it's a quick way to transfer e.g. tables in Word or Excel to HTML tables - it sure beats laborious retyping or copy/paste followed by lots of editing.

Many people have probably already cottoned on to this trick, I've been slow off the mark here - but for those who haven't, I hope this is a helpful tip. It's certainly saved me lots of time as I often have to try to convert tables sent to me in Word or Excel into HTML for webpages. And it works pretty well with PDF files too, again with just a bit of tidying up. Good ol' Google!


Technorati Tags: , , , , , , , , , , , , , , , , , , , , , ,

16 comments:

Mike Eagling said...

This is a very handy tip but it had me confused for a while, as I didn't have a "View as HTML" link!

Thanks to an anonymous comment over at Amit Agarwal's post on the same subject I've discovered that you must have your Google Mail display language set to "English (US)" for this to work.

Being British, I find this a little annoying. However, changing the language setting has enabled access to Google Chat (which is also absent in UK English), so I guess I may have to swallow my nationalist principles!

Anonymous said...

This is brilliant! Thanks for sharing.

Improbulus said...

Thanks for your comments LilacPhonograph and Ed.

I'm British too but I got my Gmail a while back (default settings of US) and I never bothered to change the language setting. I'll update the post to mention that tip Lilac, thanks for that!

Anonymous said...

You are brilliant. What a simple solution.

Improbulus said...

Glad to have been of help extremely pleased, thanks for your comment!

Improbulus said...

Thanks Kathleen!

Unknown said...

hey thanks!!! viewing source from gmail saved me tons of work - thanks you genius!!!

Anonymous said...

Word also has an option to save as 'Web Page, Filtered'. This will remove the MS specific items for you and save the trouble.

F1 Market Solutions said...

This no longer works, or at least not with Word 2007 and GMail 2. GMail will give you a message that says you must download the original document to view. Sigh.

Anonymous said...

Kudos for this tip! It's better than Chrome.

Anonymous said...

Use OpenOffice 3, it works really for converting docx files to wiki documents.

Anonymous said...

Images in your doc(x) are not available in the HTML view!

Akhil Kumar | Technical Architect | Web Development said...

this is not a solution to a problem as a developer point of view. If you no the source code to convert then publish that code.

Anonymous said...

This is a GREAT idea, THANKS A LOT !!

Anonymous said...

no longer working

Anonymous said...

It's really good! Thanx XD!!