I am planning to create a stored procedure that will query certain information from a database then write the information to the Excel file. I am planning to execute the stored procedure via Windows Task Scheduler. I have already created the queries but what is lacking is the command that would write to the Excel file. This is for the purpose of auto reporting. I've read about the OPENROWSET but have no idea how it works.
Thanks for your answers in advance.