Remove Export from a SharePoint list

Christos Christopoulos 35 Reputation points
2023-04-25T21:02:14.3133333+00:00

hello

I followed the instructions of the following answer https://answers.microsoft.com/en-us/msoffice/forum/all/remove-export-to-excel-from-a-sharepoint-list/45d7839f-a044-4e3f-8916-b61bc4bb0cad in order to remove the 'Export' button from a list in SharePoint.

Is this way accurate? cause I did not manage to hide or disable export.
(can you test it at your end?)
Is there anything out of the box..
thank you

Microsoft 365 and Office SharePoint Development
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. AllenXu-MSFT 24,941 Reputation points Moderator
    2023-04-26T02:42:14.2266667+00:00

    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. User's image
    • 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.User's image


    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.


  2. Christos Christopoulos 35 Reputation points
    2023-04-27T08:47:05.01+00:00

    Ηello ,

    Thank you for your response @AllenXu-MSFT

    Is there any way to disable the 'Export to Power BI' option in the second method?

    Also, regarding the first method with CSS, is it possible to apply this on a per-user group basis? We would like some users to be able to export their lists to Excel while others cannot."


  3. AllenXu-MSFT 24,941 Reputation points Moderator
    2023-04-27T09:09:34.9366667+00:00

    Is there any way to disable the 'Export to Power BI' option in the second method?

    No. No OOTB way can achieve this. You can provide your idea in this feedback portal: https://feedbackportal.microsoft.com/feedback/forum/06735c62-321c-ec11-b6e7-0022481f8472to let MS know your requirement. Microsoft will take your idea into consideration if it is highly voted.

    Also, regarding the first method with CSS, is it possible to apply this on a per-user group basis? We would like some users to be able to export their lists to Excel while others cannot."

    Injecting CSS to page using SPFx extension Application Customizers will apply for all users. It's impossible to apply to part of the users using development way.

    As per your requirement, the second method in my answer is recommended even though users still can see Export to Power BI. But I think this is the best alternative in your case.

    @Christos Christopoulos

    0 comments No comments

  4. AllenXu-MSFT 24,941 Reputation points Moderator
    2023-05-04T02:36:08.04+00:00

    Hi @Christos Christopoulos ,

    I understand that it's frustrating for you that users can still see the "Export to Power BI" using OOTB way. But it is the best alternative in this scenario. This is by design. It is recommended to provide feedback to MS via this portal: https://feedbackportal.microsoft.com/feedback/forum/06735c62-321c-ec11-b6e7-0022481f8472. Just raise a new thread in this portal and MS will take it into consideration if it is highly voted.

    If you still have any concern about using SPFx, just comment here and we can discuss for further support.

    Appreciate your patience and understanding.


    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.