Hi @Christos Christopoulos ,
The link you post above seems to be broken so that I'm not sure what you mean by "this way". As per my knowledge, you can inject CSS to the site to hide the Export button. You have to deploy the SPFx application customizer in modern sites and use the below CSS to remove the export to the Excel button.
button[name="Export"] {
display: none;
}
OOTBly you can create a custom Permission Level without Client Integration Features. The idea is to create a new permission level without “Client integration features” and assign that permission level to users, to disable export to excel. To create a new permission level, follow these steps:
- Click on Settings Gear >> Choose the “Site Permissions” link.
- Click on “Advanced permissions settings.” >> Click on “Permission Levels” from the ribbon.
- Select an existing permission level such as Contribute or Read >> Scroll to the bottom of the page >> Click on the “Copy Permission Level” button.
- Provide a name for your new permission level. E.g., “Read without Client Integration”. Under “Site Permissions”, uncheck “Use Client Integration Features – Use features which launch client applications. Without this permission, users will have to work on documents locally and upload their changes.” and click on “Create” button to create the permission level.
- Assign this custom permission level to users and groups who don’t need the “Export to Excel” option. Make sure the users are not part of any other higher permission groups on the site (Because SharePoint permissions work in a cumulative manner!).
As per my test, users can only see Export to Power BI after then.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.