sql server 2008 - Exporting the output of a stored proc. to excel -
sql server 2008 - Exporting the output of a stored proc. to excel -
i want export result of stored procedure execution excel worksheet,i want set job generate result , store in excel worksheet.is possible have googled not found convincing workable solutions
you can utilize insert openrowset, example:
insert openrowset ('microsoft.jet.oledb.4.0', 'excel 8.0;database=d:\output.xls;', 'exec [dbo].[spname] ''param''') exec [dbo].[spname] 'param'
you should enable advertisement hoc distributed queries before:
exec sp_configure 'show advanced options', 1 reconfigure go exec sp_configure 'ad hoc distributed queries', 1 reconfigure go
sql-server-2008
Comments
Post a Comment