views:

120

answers:

2

I want to copy a sql result set and paste it in Excel. But the data I paste in to the spreadsheet doesn't want to recognize Excel formatting. So if I change a column to currency, it doesn't do anything. But...if I double click on a cell, THEN it applies the currency format. But only to that cell.

How can I make it automatically recognize the Excel format?

I must be something I'm missing. Hopefully somebody can help. :-)

+1  A: 

Have you tried <edit><paste special> and then paste the data as text? Otherwise you're copying data AND formatting, which might be the problem.

Marga Keuvelaar
Yes, I always use Paste Special and then as Text. And before doing that, I've tried setting the Excel cells to a variety of formats, but it doesn't matter. I really don't understand it.
Mary-Chan
A: 

Seconding the <edit><paste special>, but another useful feature is <Text to Columns>. So if you paste your data as text, if it does not automatically appear in columns, use the Text to Columns to turn it into columns, then any formatting you apply should work.

celenius
Where is Text to Columns? On the SQL side or the Excel side? Thanks.
Mary-Chan
It's on the excel side; I'm not sure what version of excel you are using, but just type this phrase into your help file in excel, and it will show you where it is.
celenius