ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copy paste SQL query result to excel spreadsheet with formatting (https://www.excelbanter.com/excel-worksheet-functions/204638-copy-paste-sql-query-result-excel-spreadsheet-formatting.html)

Juliet

copy paste SQL query result to excel spreadsheet with formatting
 
How can I copy paste a SQL query result to an Excel spreadsheet without the
formatting of certain columns like(date, currency) getting affected? Right
now, I just use the copy-paste function and then I have to individually
select each date and currency column on the excel spreadhseet and change the
format. It's a labour intensive process when I have more than 20 columns to
format seperately and more than 100 spreadsheets. Please let me know if
there's a better way to go about it. Thanks for reading!

Duke Carey

copy paste SQL query result to excel spreadsheet with formatting
 
Unfortunately, there is no metadata in the clipboard that Excel can use to
pre-format or otherwise adjust the format from the sheet's default.

If you are using the same query again and again just with different
criteria, then set your formatting the way you want it after copying the
first result set. Now make a copy of that sheet and delete the data only.
Make as many copies of this new sheet as you need.

When you copy in each result set the pre-existing format should be retained


"Juliet" wrote:

How can I copy paste a SQL query result to an Excel spreadsheet without the
formatting of certain columns like(date, currency) getting affected? Right
now, I just use the copy-paste function and then I have to individually
select each date and currency column on the excel spreadhseet and change the
format. It's a labour intensive process when I have more than 20 columns to
format seperately and more than 100 spreadsheets. Please let me know if
there's a better way to go about it. Thanks for reading!



All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com