Last post Jun 13, 2018 05:59 AM by Deepak Panchal
Jun 04, 2018 04:36 PM|JagjitSingh|LINK
How to export Data from Table to excel and schelule in Sql 2008
Jun 04, 2018 04:53 PM|mgebhard|LINK
Use the SQL agent to run a scheduled job.
Jun 05, 2018 05:47 AM|Deepak Panchal|LINK
SSIS is the good option to achieve this requirement.
There are other ways are also available to do the same.
You can write a code or a script that fires a query in SQL server and fetch the data.
You can run this code using Windows Task Scheduler to perform this job based on schedule.
Below is an example of script.
Export the query to excel sheet automatically
Jun 08, 2018 11:05 AM|JagjitSingh|LINK
I have Excel Sheet with predefined format . I want that Data should go properly in that format. Using Sql 2008 . I have attached Excel Sheet also
Jun 13, 2018 05:59 AM|Deepak Panchal|LINK
From your last post, I think that it is better you develop a C# or VB code and try to fetch the data in dataset and then try to use Excel Automation using Excel.interop to get the desire output.
Other thing need to notice that Excel.interop can only work properly on client side.
So if you are running code on server side then you may need to switch to Open XML.
The logic will be like first you will fetch the data from SQL.
Using code, create a new workbook and set the data in each column and row as per your requirement.
Save the workbook on desired location.
You can call this code everyday using task scheduler of windows OS.
Because, the format of data stored in a table and format of data stored inside Excel both are different.
So there is no any feature in management studio or in SQL to export the data in that specific format.