copy paste SQL query result to excel spreadsheet with formatting

  • Thread starter Thread starter Juliet
  • Start date Start date
J

Juliet

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!
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top