Copy/Pasting data from SQL Server to Excel splits up text into multiple columns?
If you've used Text to columns recently, it will apply those settings to the Paste operation. I don't remember this happening before Excel 2007, but it may have. I always have to go back and set it back to tab delimited before I start copying and pasting again.
Before pasting the results: Data → Text to Columns
- Original Data Type: Check Delimited
- Next
- Delimiters: Uncheck Space
- Next
- Finish
Finally paste the results.
Have you tried replacing the Excel startup templates on the computer that has the problem? It may have a macro defined that is being triggered by your paste operation. According Microsoft Knowledge Base Article 924460, the templates are stored under the following locations:
By default, user templates files are stored in the following location:
- In Windows XP C:\Documents and Settings\\Application Data\Microsoft\Templates
- In Windows Vista or in Windows 7 C:\Users\\AppData\Roaming\Microsoft\Templates
I've found that if I exit Excel, and then restart it, and reload my spreadsheet, it clears the text to columns options, so the paste will work as expected again.
Hector's answer is nice in that you don't have to exit Excel, but this works as well, and is pretty quick and easy.