web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Refresh Data Automatic...
Power Automate
Unanswered

Refresh Data Automatically every morning - VPN for connection

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have an excel automated report. In the next month most of the user will lose credentials to log onto the database, therefore they won't be able to refresh the report. Is there a way to set up the refresh automatically? In order to refresh the report a connection to database is required (vpn must be enabled). 

 

I'm working on another solution as well. I want a database to export query to the csv and use that as a datasource, but the 1st option seems quicker and more approachable. The question is that even possible?

Categories:
I have the same question (0)
  • AWorley Profile Picture
    414 Super User 2024 Season 1 on at

    Might be better to make a powershell script to open the file for 5 minutes and then close automatically. Then in the workbook do a VBScript to refresh the data. Then toss the powershell script on a task schedule to open the file. 

     

     

     

    VBA script for Excel: 


    Private Sub Workbook_Open()
    Workbooks(ThisWorkbook.Name).RefreshAll
    End Sub

  • Community Power Platform Member Profile Picture
    on at

    But how do you overcome the fact that most of the users won't have access to database where the source data is? If a different user opens a file then it won't refresh as the credentials won't match the database. I am only user with access to the datasource. 

     

    Is it possible to make power automate connect somehow to vpn and refresh the report that way?

     

  • AWorley Profile Picture
    414 Super User 2024 Season 1 on at

    (Sorry just saw this notification!)

    Task scheduler has a credential field that you can use your credentials on. Typically its better to have users have read access to the ODBC connection. 

  • A7DO Profile Picture
    4 on at

    Use VB script to run Excel macro (youtube.com)

     

    Something like this. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard