Paste html into Excel 2010 without Excel parsing the html
I'm running a query on SQL. Typically I can easily copy and paste the results from the query into Excel and it preserves the columns, rows etc.
However, in this case I'm selecting a bunch of emails and the bodies of those emails are html formatted. Every time I try and paste into Excel 2010, it completely messes it up since it's trying to be 'helpful' by parsing the html and converting img tags to images and table cells to Excel cells etc.
Is there some way I can have Excel be dumb and just paste my text without trying to figure out something clever to do with it?
I've tried using Paste Special. I've tried prepending a single quote to the start of the html body (someone said that tells Excel to treat the field as text and not parse it). I tried putting pipes |
between each column, saving it to a text file and then importing the text file. No matter what I do, Excel keeps messing with the html.
Does anyone know how to paste html into Excel as just plain 'ol dumb text?
Solution 1:
I figured it out!!!!
Try DOUBLE CLICKING in the cell to which you want to paste (rather than simply selecting the cell with a single click). Your paste option should then switch to text and NOT parse the text data.
Solution 2:
Select the HTML, paste as Keep Text Only in to a new Word document, then Select All, Copy. Then when you right-click in Excel you have a Match Destination Formatting option, which is not available through the expected route. Slightly less tedious than saving as a separate file, but still a workaround that you shouldn't have to do.
Solution 3:
User [daverunt] on Mr. Excel Forums gave this answer.
It may not be applicable in all situations, because you have to save it to a ".txt" file, but it was the quickest way I could get around the problem when I had the same issue as in the original post. Mainly, in one step, it will prevent the HTML-interpretation of all your lines of text.
I think the best way is to save it in a text file.
In Excel select File Open.
Select Delimited then next
Un-tick all delimiter selections then Next
Text then Finish