Page 1 of 1

How to export data from sql server 2003 to excel

Posted: Thu 11 Aug 2005 10:40
by dragan
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

Posted: Mon 22 Aug 2005 11:37
by Ikar
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.