65.9K
CodeProject is changing. Read more.
Home

How to Copy SQL Table Into Excel and Other Formats

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.67/5 (5 votes)

Jul 11, 2013

CPOL
viewsIcon

24381

How to copy SQL table into Excel and other formats

Introduction

This post shows you how to take SQL table into Excel and other formats.

  1. Open ssms2012->databases->sample database.

  2. Click that export data. There is a new window open as shown below:.

  3. Choose the datasource, there are a lot of datasources dropdowns here:

  4. Choose the source database, here  dbo.sample is a source database.

  5. Here, you choose designation Database or other formats like oldb, excel formats.

  6. Then Excel file path.

  7. Select the first radio button for copy or second radio button for query to write the data, choose any one.

  8. Click next->select table you want to copy:

  9. If you want edit the columns means you have to use this window editmapping.

  10. You can check the preview for here:

  11. Click next.

  12. Finish.

  13. After you click finish, you can see files can be transferred like below:

  14. Go to->myDocuments, open the Excel file that you already created and all data comes to Excel sheet. That’s all.