Share via

copy paste html content from SSMS into excel

Anonymous
2013-05-17T18:16:39+00:00

Amazing how much time i wasted trying to do something so simple because excel is trying to be clever. Also amazed i couldn't find an answer to this already since I know I'm not the only person who ran into this problem.

I have a query I've run in sql server management studio. returns a couple of columns one of which is a bunch of html. 

I want to copy and paste the results into excel and I do not want excel to try and do anything clever with the html. Just paste it all into a cell. Right now excel is totally messing up the data because it's parsing all the html tags and splitting what should be a single column into multiple columns a rows, not to mention it's loading any img tags etc

I've already tried doing a paste special, tried formatting as text, tried saving my results as a txt file with pipe separated fields. Excel continues to try and parse the html.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2013-05-18T20:30:02+00:00

    The fact that I am copying from a sql query is irrelevant. i can copy and paste from a text file and have the same results. It's because i'm pasting html - i need to know how to paste html into excel without excel trying to do anything with the html - it should just treat it as plain text.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-05-18T14:01:08+00:00

    Hello Ian,

    Since you’re trying to copy the query result of SQL server into Excel, your query would be better addressed in the Excel IT Pro forum link mentioned below:

    http://social.technet.microsoft.com/Forums/en-US/excel/threads

     Thank you.

    Was this answer helpful?

    0 comments No comments