RefreshAll in Excel sheet which connects to SQL

Aswinraj

Board Regular
Joined
Dec 10, 2015
Messages
65
Hello guys,

I Need to do Refresh All in Excel Sheet which connects to SQL. I tried Record Macro but i am not getting any code. Can anybody help on this please.

In Excel Ribbon - Data Tab - Refresh All.

1587050115439.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
@alansidman : Actually I dont have any macro code to trigger refresh.. i am asking for code to trigger refresh. Since when i record macro by clicking Data tab in excel ribbon and clicking refresh all - i am not getting any recorded code.
 
Upvote 0
From the Book "M is for (Data) Monkey", here is the correct means to record a Macro to Refresh

Start Recording
Name the Macro Refresh and store it in This Workbook
Go to Data-->Connections-->Power Query-Transactions-->Refresh
Click Close
Stop Recording
 
Upvote 0

Forum statistics

Threads
1,216,753
Messages
6,132,514
Members
449,731
Latest member
dasda34

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