If you want to export into an Excel:
You can use three common file formats to export SQL Server data to Excel:
- Excel workbook (
XLS
/XLSX
file).
Note : Only SSIS (SQL Server Integration Services) supports exporting to Excel workbook.
Note : SQL Server Express Edition not allows to save a SSIS package so you can use this way only if you have SQL Server Standard or higher.
[Read this article :] SQL Server Export to Excel using SSIS.
Microsoft Excel users can open CSV
file the same way as a native Excel file.
So export to CSV
files is suitable for most cases and you can use a simple command line utilities instead of SQL Server Integration Services.
The disadvantage of the export to Excel workbook or CSV
file is that a user receives a new file every time and losts its changes.
[Read this article :] SQL Server Export to Excel using bcp/sqlcmd and CSV.
XML
can be more suitable as a user can import XML
file to an Excel workbook once and then refresh the data when get a new file.
[Read this article :] SQL Server Export to Excel using bcp/sqlcmd and XML.