Forum Discussion

aceremin's avatar
aceremin
Copper Contributor
Mar 18, 2022

Refresh query in protected sheet

Hi all,

I have an Excel that uses Power Query to Get Data from an Excel Online (to get the information, I applied Get Data --> Web and used the path of the file). So far, so good.

However, I want to share the file with other users that should be able to Refresh the Query, but I don't want them to be able to modify the Sheet. So I thought I should "Protect Sheet". But if I do that, when I select Refresh all from the Data ribbon, it fails because the sheet is protected.

Thanks in advance for your help.

Regards.

    • aceremin's avatar
      aceremin
      Copper Contributor
      Riny_van_Eekelen
      Thanks for your answer.
      However, I am not currently interested in protecting my query (I don't think the users will modify it), but what I actually want is to protect the sheet where the query imports the data from another excel (because I think that users could accidentally modify it). When I protect the sheet, and then I hit "Refresh", I get a message that warms me that the refresh is not possible because the sheet needs to be unprotected.
      Thanks again anyway.
      Best regards
      • ooptennoort's avatar
        ooptennoort
        Copper Contributor
        Ken Puls says: "The answer to this question depends on whether or not you use Power Pivot. If you don't, then yes, you're good to go. As long as all your tables land on worksheets or as connections, then a refresh will work even when you protect Power Queries via the Protect Workbook method."

        But though I'm not using Power Pivot (and don't use the data model, as far as I am aware), refresh does not work... You're probably not using PP either, are you?

        See: https://excelguru.ca/protect-power-queries/

Resources