sql server导出数据到Excel

执行语句: 

EXEC master..xp_cmdshell 'bcp test.dbo.Table1 out c:\dd\Temp.xls -c -q -S".\SQLEXPRESS" -U"sa" -P"123"'

 

出错解决方法: 

exec sp_configure 'show advanced options',1
reconfigure

exec sp_configure 'xp_cmdshell',1
reconfigure

你可能感兴趣的:(sql,c,SQL Server,Excel,XP)