[Excel] use of SQL Server database to read Excel 2012

[Excel] use of SQL Server database to read Excel 2012


After entering Excel, select "Data" → "From other sources" → "from SQL Server"

image

Select the database you want to connect, enter "server name" and "Login authentication" information.

image

The selection of databases and data tables

image

Complete data set

image

Generally speaking press "OK" on it; If you worry too heavy data load for too long, you can select the "Content", to do further adjustments

image

At this point you can select the "Definitions" tab, the "command type" is changed to "SQL", and adjust the "Command Text", originally specified table name into the SQL syntax, be careful not to engage in other words double and single quotes use of quotes.

image

If the fetched data is not what you want, you can then select the "Content"

image

Press the button next to the "Name"

image

You can re-adjust the SQL syntax to change data retrieval conditions

image

It is directly above the main data read by Excel, but this would be more trouble that, if a 64-bit Excel, then can try to use PowerPivot way to load all the data, then is filtered under a ways.

Original: Large column  [Excel] use of SQL Server database to read Excel 2012


Guess you like

Origin www.cnblogs.com/chinatrump/p/11516552.html