Is it possible to import multiple SQL statements into separate excel sheets?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello!

I want to 'Get Data From Database' and use several SQL queries so that each query is 'loaded' into separate sheets.

Is it possible to do that in a smart way without having to click 'Get Data' for each SQL query separately?

I am looking for something like a way to import these queries in bulk and download them into separate sheets.

Thanks!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Upvote 0
Unfortunately, I do not seem to have a connection. What I did was to click to Get Data and added one SQL statement. This resulted in a 'Query' but not a 'Connection'.

Can you provide please the full list of actions to achieve my goal?
 
Upvote 0
On the Data Tab, click on Queries and Connections. A new window will open to the right. It will offer Query and Connection. Click on Connection.

You can set up a query for each SQL on separate tabs. Clicking on Refresh All will update each query when new data has been added.

This should work, unless I am not completely understanding your requirement.
 
Upvote 0
On the Data Tab, click on Queries and Connections. A new window will open to the right. It will offer Query and Connection. Click on Connection.

You can set up a query for each SQL on separate tabs. Clicking on Refresh All will update each query when new data has been added.

This should work, unless I am not completely understanding your requirement.

Thanks but there, it does not have an 'Add Query' button nor an 'Add Multiple Queries' button, if you know what I mean?

How can I import multiple queries under that 'Queries and Connections' in Excel with one click? Do I have to add each using 'Get Data'?
 
Upvote 0
You will have to build each query and close and load each to a different tab. Once all are built then when you wish to update, you would click on Refresh All on the Data Tab. I have already explained this in an earlier post.

To really understand Power Query and get the maximum benefit, I suggest you pick up a copy of "M is for (Data) Monkey" by Ken Puls and Miguel Escobar. It is available in the Mr Excel Store or on Amazon.
 
Upvote 0

Forum statistics

Threads
1,215,237
Messages
6,123,805
Members
449,127
Latest member
Cyko

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top