How to automatically report an SQL query into an Excel spreadsheet in regular intervals
I am currently working on an application that is meant to be relaying realtime data on screens. I would like to know how to automatically report the resultset of a开发者_运维知识库 SQL query to a Microsoft excel sheet using SQL Server 2005.
Many thanks for your audience and anticipated help.
Cheers, Tunde
Probably the simplest way of exporting from SQL Server to Excel in TSQL with OPENROWSET. Find out more.
Then schedule the running of the TSQL using SQL Server Agent.
The best would be to write a program Or even a excel Plugin in .net that writes your query result to a csv file at certain intervals that you can open with excel.
精彩评论