Refresh Excel Data Connections Query

Can anyone provide an example of how to refresh data connections of an excel which is placed in Sharepoint?
I need to refresh the query inside of it without manually opening the file, as I usually do.

Open your excel using Excel Application Scope;
Inside the scope use an Attach Window to your Excel.
Use a Send Hot Key with Ctrl+Alt+F5 values.

I just answered a similar question here (screenshots available):

1 Like

Hi @RAZVAN-MARIUS_ANDONE ,

Try Macro code

Private Sub Workbook_Open()
'PURPOSE: Run Data tab’s Refresh All function when file is opened

ThisWorkbook.RefreshAll

MsgBox “Stock Data has been refreshed!”

If this doesn’t work for you let me know I will provide invoke code or macro whichever you prefer.

End Sub

1 Like

Hi Manoj, In UiPath Studio Pro Community edition, do you know if there is a way to natively use the “Refresh Excel Data Connections” activity which is supposedly included in the UiPath.Excel.Activities package?

Hi @RAZVAN-MARIUS_ANDONE ,

Try this, let me know if you face any issue.
RefreshAll.xaml (4.7 KB)

Thanks for the reply!

I also need to know how to make the Uipath process use the excel file located in Sharepoint while unattended, with a robot perhaps. How do I connect the Excel Scope to that file located in Sharepoint and with my PC off?

Thanks for the reply!

I also need to know how to make the Uipath process use the excel file located in Sharepoint while unattended, with a robot perhaps. How do I connect the Excel Scope to that file located in Sharepoint and with my PC off?

Is it possible for Excel Scope to access a https?

I know I can map Sharepoint to OneDrive, but will it access the excel file with my PC off?

Install below package and check if their is any activity which will help you to achieve this.

Will try, thank you very much!

1 Like

I’ve searched yesterday for the exact same thing but I am unable to even find the activity inside Studio. Do you know how to find it exactly? Maybe I am using the wrong Studio version, should it be X or Pro? Should I get some specific package installed?

I am using 2021.4.3
Which version you are using?

Also make sure

Local, official, marketplace checkbox is enabled.

Go to Manage Packages — Settings—

damn, 2020.10.7 and it’s a version offered by the company I work for.

Seems I need an update to see those new activities.
All packages are checked in settings .

There is one more package, not sure this helps you.

I never used it, try it

Yeah, I saw those too but when I try to install them, I get an error stating that it cannot be installed :frowning:

Could be some restriction due to company policies.

Right, that’s not Uipath package.

Is refresh excel worked for you ?

Nope, I am stuck.

When I use the Excel Scope, it does not accept the Sharepoint link I insert, it only works if I provide a local file path.

Te BIG question remains: how do I use the Excel file located in Sharepoint? I need to do this without linking Sharepoint to OneDrive, I need to run the process without my PC being open.