Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 11, 2011 12:24 PM by mahioak
Member
185 Points
49 Posts
Apr 11, 2011 12:24 PM|LINK
Hi all,
The below script is used to export the query result to an excel sheet.
Before performing exporting, we must enable the following options.
EXECUTE sp_configure 'show advanced options', 1; RECONFIGURE; EXECUTE sp_configure 'Web Assistant Procedures', 1; RECONFIGURE;
Now the below script is used to export the query result to an excel sheet.
DECLARE @temp NVARCHAR(MAX) SET @temp = 'Select * from tableName' EXEC sp_makewebtask @outputfile = 'd:\testing.xls', @query = @temp, @colheaders =1, @FixedFont=0,@lastupdated=0,@resultstitle='testing title'
Thanks & Regards
Mahendra
mahioak
Member
185 Points
49 Posts
Export query results to an excel sheet
Apr 11, 2011 12:24 PM|LINK
Hi all,
The below script is used to export the query result to an excel sheet.
Before performing exporting, we must enable the following options.
Now the below script is used to export the query result to an excel sheet.
Thanks & Regards
Mahendra