How to Disable Export to Excel Button in SharePoint Online?

Requirement: Disable Export to Excel in SharePoint Online.

How to Disable Export to Excel in SharePoint Online?

A business team wanted to remove the ability to export list data into Excel. How do I disable or hide the “Export to Excel” button in modern SharePoint Online lists? sharepoint online disable export to excel

Option 1: Create a Custom Permission Level without Client Integration Features

The idea is to create a new permission level without “Client integration features” and assign it 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.
  • “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 to 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. create permission level without Client Integration Features
  • 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!).

Any user or group with the above permission level won’t get the “Export to Excel” button in SharePoint Online modern lists and libraries. (Export to Excel would be disabled in the classic experience!). Please note this disables other client integration features as well, such as “Open in File Explorer”, “Edit in App”, etc.

Option 2: Inject CSS to the Site to Hide Export to Excel Button

Instead of dealing with permissions, The second approach disables the export to excel button from everyone including Site Administrators with the help of CSS. 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 to Excel"] {
      display: none;

Refer to this post to insert CSS in modern SharePoint Online sites: How to Inject Custom CSS to Modern SharePoint Online Sites?

SharePoint Online: Hide Export to Excel in Classic Experience

If you are using Classic experience, You can edit the page, add a script editor web part and then place this CSS to remove export to excel in SharePoint Online list.

<style type="text/css">
   a[id*='ExportToSpreadsheet'] {

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

One thought on “How to Disable Export to Excel Button in SharePoint Online?

Leave a Reply