How to export data from sql server 2003 to excel

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dragan
Posts: 3
Joined: Thu 11 Aug 2005 10:29

How to export data from sql server 2003 to excel

Post by dragan » Thu 11 Aug 2005 10:40

How to export data from sql server to excel.

I found:
Create an Excel file named testing having the headers same as that of table columns and use this query

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\testing.xls;',
'SELECT * FROM [SheetName$]') select * from SQLServerTable

but i want to create new excel dokument. A have delphi 6.0 and sqlserver 2003 and sdac 3.55.0.16

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 22 Aug 2005 11:37

SDAC doesn't provide this ability directly.
But some third-party reports allows to generate a report in Excel using any descendant from TDataset, and also TMSQuery.

Post Reply