I have an Excel file on-prem with macros and connection to an on-prem SQL server. Every user has a copy of this file. When they open it or click on refresh then it fetched data from SQL data source.

I'm looking to upload this to SharePoint so that there is a central version of this excel file.

  1. How do I enable auto refresh on this excel file?
  2. How do I make it to connect to the on-prem SQL server?

1 Answer 1


If the user's open the file in Excel desktop from SharePoint, then the macros should still work. Though, you may want to require check in/check out for the library where this file will be stored (otherwise multiple users may try to refresh the data in the file at the same time, I'm not sure if co-authoring would deal with that scenario well).

If the file is opened in Excel Online, then the macros will not work. The macro will only work in Excel desktop.

  • What does open in desktop from SharePoint mean?
    – variable
    Aug 17, 2023 at 3:49
  • referring to the Excel desktop app Aug 17, 2023 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.