February 27, 2009 at 4:45 am
For some reason, pasting to Excel has become a real problem for me!
I will run a query and copy the results to Excel - sometimes this will work 100% fine. Other times all the columns from SQL are stuck together and made into one column in Excel.
A correct paste in Excel should look like this (A,B,C are columns in Excel):
A B C
ID Name Address
12 Bob 123 The Road
Often it will just paste like this:
A
12 Bob 123 The Road
A closing Excel windows (sometimes ALL sometimes only some) and opening a new document seems to cure it, but it's really infuriating.
Clearly there's nothing wrong with the TSQL as it pastes fine after messing round with Excel.
Any ideas? - i paste from SQL to Excel probably about 30+ times a day, so this is infuriating and time wasting!!
February 27, 2009 at 5:08 am
No sure what is going on,
But clicking the text-column button in Excel should fix the formating on the Excel side
February 27, 2009 at 7:29 am
as I said, sometimes it works sometimes it does not.
Text - columns in Excel doesn't work as there are just spaces between the fields - some data in some fields contains spaces, so there's no delimiter so to speak of.
February 27, 2009 at 8:05 am
Why you don't use Excel data import/export functionality ?
It's work fine with excel and SQL Server.
February 27, 2009 at 8:07 am
Because it takes considerably longer to export using the wizard vs copy/paste when you do it all day every day! (unless I'm missing something)
February 27, 2009 at 8:36 am
Simple webapp or VB script can save many time for you.
Without any coding you may create view (for different querys) and store excel connection
to this view. You can acces that connection by 1 click (if it will be placed on toolbar)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply