TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
snowal raj
NA
166
39.8k
how to set auto fit in excel in sql
Dec 14 2016 11:03 PM
Hai,
Every day i send report excel file to my client .so i create job to send mail using "SP_SEND_DBMAIL",Its working properly but.i can't set autofit colums in excel
this is a query for send mail
use msdb
go
DECLARE @SUB VARCHAR(100)
SET @SUB = (SELECT 'Daily Sales Report on '+ replace(convert(NVARCHAR, getdate(), 106), ' ', '/'))
EXEC sp_send_dbmail @profile_name='test Profile',
@recipients='
[email protected]
', @subject=@SUB,
@body='Attachment File Sent',
@query=select * from tr_sales_mas,
@query_attachment_filename='test.csv',
@attach_query_result_as_file=1,
@exclude_query_output=1,
@query_result_separator=' ',@query_result_width =32767,
@query_result_no_padding=1,
@query_result_header =1
go
how to set auto fit to excel columns
Reply
Answers (
1
)
stored procedure to update data in multiple tables
How to Select a Record and use the result to Update