Formatting when copying SQL data and pasting into Excel

I want to copy the sql result set and paste it into Excel. But the data I am inserting into the spreadsheet doesn't want to recognize the Excel formatting. So if I change the column to currency it doesn't do anything. But ... if I double click on the cell THEN it will apply the currency format. But only in this cell.

How can I automatically recognize Excel format?

I must be something I'm missing. Hope someone can help. :-)

+2


source to share


4 answers


Have you tried <edit><paste special>

and then paste the data as text? Otherwise, you will be copying data and formatting, which can be a problem.



+1


source


Secondary <edit><paste special>

, but another useful feature is <Text to Columns>

. So if you paste your data as text, if it doesn't appear automatically in columns, use text in columns to turn it into columns, then whatever formatting you apply should work.



0


source


Change Excel column format in text and then paste special -> TEXT

0


source


After entering data into columns in Excel, select all cells and select the Data tab in the top ribbon. On the data tab, click Text to Columns, in the pop-up window, select Delimit, then uncheck all the boxes in step 2 of that pop-up and click Finish. This will force all cells to update to your formatting.

0


source







All Articles