I can’t believe how stupid Excel (2002/XP) was with the table of browsers the other day.
The plan was to get the numbers into Excel, copy/paste into a Frontpage table to strip back the formatting, then paste into WordPress.
Nup, bloody monstrous Excel tags right the way through it, which Frontpage couldn’t override, and evidently no easy way to strip. No combination of Paste Special would work. So for example, instead of <td></td> we got:
<td align="right" x:num="1.15E-2" style="color: windowtext; font-size: 10.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; text-align: general; vertical-align: bottom; white-space: nowrap; border: medium none; padding-left: 1px; padding-right: 1px; padding-top: 1px"></td>
I kid you not. Now, I know about round-trip HTML, though I have my doubts that anybody uses it — firstly because it looks like crap in a web browser, and secondly because if you’ll want to edit it later, you’ll just keep an XLS copy. Besides, it’s badly implemented. The cell above was using the “Normal” style. It shouldn’t have had all the formatting crap embedded in it.
Word XP actually has a Save As Filtered HTML option to strip out all this crap. Excel XP doesn’t. (I haven’t checked Excel 2003 yet).
Plan 2 was to save it as HTML, load it into FrontPage and crop the HTML to paste into WordPress. Nup, trying to re-open it in FrontPage just threw it back to Excel. WTF?! Opening in UltraEdit (my preferred text editor) just revealed the same tags as above.
How can two Microsoft products that are part of the same suite, same version, operate so disastrously badly with one another, for something as simple as copying a table?
Plan 3? Oh bugger it, it’s only a few lines, just write it by hand.
If it were more I’d go install and run that clear The Useless Crap Out Of The HTML filter thing (oh look, they could do with clearing the crap out of their URLs too), but it refuses to install unless you have Office 2000. Wonderful.
Next time (after swearing a bit) I’ll probably save to CSV and then do a global replace from commas to table tags.
Surely there must be an easier way?
Paste the text into word and use a global replace of “
I love Microsoft’s automated HTML generators. No really. Why make a page 1K when it can be 1Mb? 🙂
I am having the EXACT same problem as we speak!! taken over 2 hours and I’ve gotten nowhere. FOR A FREAKING TABLE!
i created a .csv from excel then imported that data into dreamweaver and it created a clean, filtered table.
Just get a gmail account, email the excel spreadsheet to yourself, then read the email – click “view as html”. DONE
Back when this post was written in 2004, there was no Gmail.