user2618074
user2618074

Reputation: 55

is there any Query to save the Data in Excel File

I have a table students that contains 100 Records.

Now i'm going to Run a Query

select * from Students

I Copy the Students Data and Paste it in My Excel File

After some Time i inserted another 100 Records now again i'm going to run the Query copy the Data and Paste it in Excel File

Every Time copied and Paste in Excel File.

Is there any Alternate way or Query that directly save the Data in my Excel File

Upvotes: 1

Views: 155

Answers (1)

Chamal
Chamal

Reputation: 1449

Simplest way would be accessing database table by creating a data connection from excel. I assume you are using Sql server database.

  1. In Excel go to the Data tab
  2. Select relevant data source in the "From Other Sources" drop down
  3. Select Sql server and give necessary conection information and select the table you wanted while navigating through.
  4. Select "Table" as prefered view option and it will show the table in excel.
  5. When a change happen in the database simply right click the excel table and Refresh it

Upvotes: 1

Related Questions