简体   繁体   中英

How to export a table from Microsoft SQL Server to Excel?

I have set up an automatic job to run a query/report on Microsoft SQL Server. The job runs fine and produces the correct data. However, I am having trouble with what syntax to use in order to get the automatic query to transfer all of the report into an Excel spreadsheet and save it into my documents (if this is even possible..).

This has to be automatic and part of the Job as the query/report runs overnight.

Thanks!

1 - Open a New Excel

2 - Go to Data Tab

3 - Select From Other Sources (Refer image attached)

4 - Select From SQL Server (Refer image attached)

在此处输入图片说明

5 - Enter the Server authentication and connection details to proceed further

This would ask for your server details and authentication. Then it would be asking the range or a cell were the data to be linked or exported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM