User269602965 posted
Prepare a query, connect to the database (Oracle, MSSQL, MySQL, others), open a data reader, then with the dataset you create, there are many ways to get the date moved to an Excel data grid window in a web page or WPF/WINFORM application, or into
an Excel file.
If you are doing this regularly, you can use full featured licensed Excel libraries like Spreadsheet Gear or Progress (aka Telerik), or on budget get open source libraries (google there are many), or for just get it done … .NET OPEN XML SDK.
Uses: quick reports like nightly audits and counts, user on screen reports of sales, generating portable datasets like customer contact lists, and many other uses. Of course EXCEL has limitations in size of the data and rows exported.
There is a bit of a learning curve, some experimentation to get the right look in your XLS sheet.