Forum Discussion
Devshan
Feb 11, 2024Copper Contributor
Hide 'Export to excel' button in both SharePoint List and MS List view
Hi Everyone,
I'm using a custom permission level without the following permission to restrict a few groups of users from exporting list data to Excel.
When users access the Modern SharePoint List, the permissions work as expected. Those users are not able to see the 'Export to excel' button.
However, when they navigate to the MS List view by adding "?env=WebViewList" to the URL, they are still able to see the 'Export to excel' button and can export the list to Excel.
I would like to check if this is a product behavior or a bug. Is there any way to restrict the export to excel functionality in Microsoft Lists as well? My requirement is to allow only certain users to export the list data to excel.
Sample Screenshots attached below.
SharePoint List:
MS List layout:
Not completely sure why this behavior is completely different for both the products. You can raise a support ticket with Microsoft directly and report this behavior at: Get M365 Support - Online Support
However, you can hide the export to excel button using JSON view formatting in SharePoint. Use JSON like:
{ "commandBarProps" : { "commands": [ { "key": "export", "hide": true } ] } }
Note: This hides the button from list view for all users - not possible to hide it based on permissions/access currently. So, if you want this button visible for very few number of users, they can create new personal/private view for them where the button will be visible.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.