Amit Goel
Amit Goel

Reputation: 53

While pasting data from SSMS in Grid view (SQL Server Management Studio) to Excel, all the column data is in one single column

I queried select statement in SQL Server in grid view, and tried pasting the data into Excel. There were many columns, but when pasting into Excel, the data shows up in a single column. Can't understand why

Upvotes: 0

Views: 2205

Answers (3)

Wagner_Cateb
Wagner_Cateb

Reputation: 33

This started to happen after I used [Data > text-to-column] in Excel with option "delimited", then unchecked "tabulation". Once I use it again, leaving "tabulation" checked, all pasting grid data resumed operating normally.

Upvotes: 1

PiotrS
PiotrS

Reputation: 188

Make sure in SSMS the output of the query is displayed in Grid View. Copy from grid view to excel. I actually use this very often, it always works.

Upvotes: 0

Jim Jimson
Jim Jimson

Reputation: 2528

You'll need to use text-to-columns in Excel after you've pasted your data in. Data > Text to columns.

Then the next time you paste it should keep the correct format.

I've also had luck with restarting both Excel and SSMS to fix the problem.

Upvotes: 0

Related Questions