Can I refresh excel sheet without opening the file

Can I refresh excel sheet without opening the file.

Short answer is No.
But if you can explain the scenario more then there could alternatives that may help you.

Actually, dynamically data is coming to the sheet from another sheet with queries and connections.So until i didn’t refresh the sheet i didn’t get the updated data. @AkshaySandhu

Hi @Poddar_Vikash

Open the excel file → Goto Data Tab → You can find the Refresh button

Note - Use Get Active Window activity.

Keyboard Shoetcut → Ctrl+Alt+f5



I don’t want to open the sheet @Gokul001

Thanks for the reply

So how you are updating the excel file ? UiPath with Execute non query etc or via macros.

What i want to achieve is “Open the excel sheet->Go to data tab->On queries and connection section i just have to click Refresh All button”.By doing this my sheet get updated via the queries.

This i want to do in automation without opening the file means all these executed in background. @AkshaySandhu

1 Like

Hi @Poddar_Vikash

Try to see whether u can do the refresh via VBA which can refresh after every regular interval

Thanks and Regards
Nived N

1 Like

That’s a good idea, but what do mean by after every regular interval.

try the attached vbscript file. Change extension to .vbs
Refresh_Excel.txt (470 Bytes)

use invoke VBScript activity for the same

Update: removed the test line

1 Like

Thanks @AkshaySandhu for the vbscript i get the clear idea about how to do this,your script may work but i think you script time complexity is quite high it may be resolved by much less time.Anyways thanks a lot now i can solve this.

1 Like

That’s great!
Can you explain more on how you are going to reduce the time complexity?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.