Search code examples
excelhtml-tableexcel-2003

Convert Excel HTML to cleaner HTML


Is there an easy way to convert the output of Excel 2003's Save to HTML option to something more 'friendly'? I have an Excel document with about 20 columns and 50 rows.

Throughout the saved HTML file I have obsolete HTML (example: <table x:str border=0 cellpadding=0 cellspacing=0 width=1366 style='border-collapse: collapse;table-layout:fixed;width:1025pt'>), in line styles, and empty cells all over the place.

I'd like something less 'table-y'. Is there a way to either force Excel 2003 to save it using more CSS and less tables or a way to convert tables to divs more easily than going through the HTML file by hand?


Solution

  • If you have Dreamweaver, you can use its markup cleaner tool...which I believe is designed for this kind of thing.

    Create a new HTML document in Dreamweaver, copy and paste your code in and use the cleanup tool.

    Here's one guide I find, but you could probably find better if it doesn't help:

    http://www.articleonlinedirectory.com/656381/cleaning-up-unwanted-formatting-dreamweaver.html

    Good luck.