Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Create Excel XLS from T-SQL

By David A. Long,

This is a T-SQL script that uses OLE, ADO, Jet4 ISAM, and Linked Server to create and populate an Excel Workbook (XLS) file from T-SQL query. If the Excel Worksheet exists, the query will append to the "table".
The code is designed to be used by SQL Agent and to append to the step output with verbose and minimal detail.
Code is pretty well commented, including some hard won knowledge about Jet4 ISAM, OLE, ADO, and usage of the Excel table from T-SQL.

Total article views: 6479 | Views in the last 30 days: 15
 
Related Articles
FORUM

Problem with EXCEL

EXCEL

FORUM

SSIS importing Excel

SSIS EXCEL

FORUM
FORUM
FORUM

Fill the excel

Fill the excel

Tags
 
Contribute