export data from sql server to excel

  • Hello, I faced with an issue: there is a need to export data from SQL Server to excel. Can you help me? How to do this? I'm on SQL Server 2008 R2

  • Would the Import/Export Wizard could help you? It uses SSIS to export the data and you can save the package to edit it or run it anytime.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • As mentioned prior, use the import-export wizard, or run the results to grid and if its not a lot and copy & paste them into the spreadsheet.

  • Thanks for replies. I would specify my question... I need to export data from .bak file any easy way.

  • Have you tried restoring it first?

  • If you have a .bak file, you need to restore the file into a database, as you only have a backup file.

    https://msdn.microsoft.com/en-us/library/ms177429.aspx

    After restoring your database, you need to define what are you going to export to Excel and export it.

    There are probably some 3rd party tools that can use the .bak file directly, but you might need to pay for them.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Thanks a lot. I didn't restore .bak.

  • As Luis C. wrote, you cannot restore the data from a .bak file to Excel directly, but you have to restore it on your database server first. During this process of restoring the database backup file, the table structures will be created and data will be inserted in them, depending on what type of backup file it is. In order to restore a .bak file you can use SQL Server Management Studio (SSMS) and you have to make a few steps. This steps described in an article with details http://sqlbak.com/blog/export-data-from-a-bak-file-to-excel/[/url] Hope it would be useful

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply