Hello,
We have a form that populates a SQL table. We need to find a way to create an automated email that sends an Excel sheet with the data once a week. Does anyone have any suggestions or a way to do this? Thanks.
Hello,
We have a form that populates a SQL table. We need to find a way to create an automated email that sends an Excel sheet with the data once a week. Does anyone have any suggestions or a way to do this? Thanks.
I have used a workflow to query the data and then format an email body in a CSV format. The user then has to cut and paste the email body into a spreadsheet. Not elegant, but it works. You might want to look at what functions are available in MSDB.DBO to utilize SMTP.
I would use the SQL server mail as well for this, cleaner and simpler in my experience
https://stackoverflow.com/questions/70605969/export-sql-result-to-csv-through-sp-send-dbmail
I use several of these to attach spreadsheets to an email that go out daily or weekly. Feel free to email me if you need mores specific instructions. agoerner@coppellisd.com