Hide/Remove the “Export to Excel” button

Export-to-Excel

Sometimes this button has got to go.

I have a user who doesn’t want to make edits in the SharePoint list.  He exports the list to Excel, makes his edits there, and then forces others to manually update the list with his edits.  No more.

I tried using F12 and writing CSS code to do the trick but it wasn’t working.  As usual, Google led me down many paths, most all of which were either over-the-top (write a solution in C# and deploy) or they just didn’t work.  I finally found the one that worked and I confess, I wouldn’t have written the code like that.  So I’m glad Wendy Li is smarter than I am.

Here’s the solution:

Edit the Page.  Add a Script Viewer web part, then paste in the following code:


<style type="text/css">
 
a[id*='ExportToSpreadsheet']
{  display:none;}
 
</style>

You cannot copy content of this page