I have connected to a SQL server in Excel . I want to be able to import data from a table located on the server. However this table is too big to import into Excel, I'm talking millions of rows. I only want to import certain data into Excel, for example only import the data where the date is between a certain range. Where can I do this in Excel? If there are any alternatives to retrieving data from a large database please let me know.
-
Which version of Excel?Mark Storey-Smith– Mark Storey-Smith2014年07月24日 15:45:13 +00:00Commented Jul 24, 2014 at 15:45
-
@MarkStorey-Smith 2010Theman– Theman2014年07月24日 16:01:00 +00:00Commented Jul 24, 2014 at 16:01
-
1Try the Power Query add-in.Mark Storey-Smith– Mark Storey-Smith2014年07月24日 16:17:45 +00:00Commented Jul 24, 2014 at 16:17
-
@MarkStorey-Smith: That seems to have licensing limitations if OP is still on Office/Excel 2010.Pieter Geerkens– Pieter Geerkens2014年07月24日 21:17:21 +00:00Commented Jul 24, 2014 at 21:17
2 Answers 2
In EXCEL, from the Data ribbon, Get External Data tab, select From Other Data Sources -> From SQL Server.
Follow the wizard to connect to your server and create a query.
-
How can I create a query? It gives me the list of tables on the database but it doesn't give me an option to create a queryTheman– Theman2014年07月25日 13:13:31 +00:00Commented Jul 25, 2014 at 13:13
If you can define the T-SQL query to filter the rows to a specific date range, create a view and choose the view object within Excel instead of the source table.