Question

Bog_firm on Thu, 12 Apr 2018 15:37:25


Hi guys,

Microsoft SQL server 2014/Management Studio: when paste the query results into Excel does not display properly.

It was working fine in SQL2008

any idea?


Replies

Hilary Cotter on Thu, 12 Apr 2018 17:17:26


It should, but it depends on if there is any formatting in the data you are trying to paste.

If this is so, you should use an uncommon delimiter - like the "|" symbol, and save the execution results to a file and then import them into excel.

Erland Sommarskog on Thu, 12 Apr 2018 21:33:50


Microsoft SQL server 2014/Management Studio: when paste the query results into Excel does not display properly.

What do you mean more exactly? That line breaks in the data messes things up?

Download and install the most recent version of SSMS here,
https://msdn.microsoft.com/en-US/library/mt238290.aspx
In SSMS 17, there is an option for you want line breaks to be handled when copying. The default is the behaviour in SSMS 2005/2008, remove the line breaks. (I often copy cells with SQL statements to a query window. In that case, I want the line breaks to be retained.)