Forum Discussion
aceremin
Mar 18, 2022Copper Contributor
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.
- Riny_van_EekelenPlatinum Contributor
aceremin According to the article in the link below, you can to some extent. See if this can apply to your situation.
https://www.excelguru.ca/blog/2017/05/02/protect-power-queries/
Not sure if anything changed since the article was published in 2017. Haven't tested it myself.
- acereminCopper ContributorRiny_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- ooptennoortCopper ContributorKen 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/