将sqlserver表数据导出到Excel

问题描述:


我正在尝试将sqlserver 2005表值导出到excel视图中.我尝试了很多方法,但没有成功.如何将表值导出到Excel?

问候,

Sasikumar
MCAMDOIS


I am trying to export sqlserver 2005 table values into excel view. I''ve tried many ways but no success. How do I export the table values to Excel?

regards,

Sasikumar
MCAMDOIS

请参见此处 [ ^ ].


Apart from using DTS and Export wizard, we can also use this query to export data from SQL Server2000/2005 to Excel
Create an Excel file named testing having the headers same as that of table columns and use these queries
Export data to existing EXCEL file from SQL Server table





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


')选择 * 来自 SQLServerTable ;)
') select * from SQLServerTable ;)



有关详细信息,请检查此链接
单击此处



For details, check this link
Click Here