Forum Discussion

HaniroothC's avatar
HaniroothC
Copper Contributor
Jun 30, 2023

Restrict rows in Excel based on User ID

Is there a way to restrict edit access to certain rows based on the login User ID?

For example: I have an online excel workbook which will collect data from five members. If I pre-fill a row with a User ID "ABCD", then only that particular user (ABCD) should be able to edit that entire row. Edit access for that particular row should be blocked for other users. User ID in this case would be the mail ID they use to login.

Appreciate your help!

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    HaniroothC 

    In Excel Online, you cannot directly use VBA to achieve the same functionality. However, you can explore alternative methods to restrict access to certain rows based on the User ID.

    Here are a couple of options:

    1. Excel Online Sharing and Permissions: Excel Online offers collaboration features that allow you to share the workbook with specific users and assign permissions. You can share the workbook with individual users or groups, and grant them specific editing rights (such as edit, view, or comment). By controlling the sharing and permissions settings, you can restrict edit access to certain users for specific rows or cells.

    Share a workbook in Excel for the web

    Share and collaborate with Excel for the web

     

     2. Custom Web Application: If you require more advanced user-specific access control, you can consider building a custom web application using programming languages like PHP, JavaScript, or .NET. The web application can interface with the Excel data and provide the necessary authentication and authorization mechanisms to restrict access to rows based on the User ID. Users would interact with the web application instead of directly modifying the Excel file. This approach provides more flexibility and control over the access restrictions.

    Move Excel spreadsheets online, share and embed web app in your website

    Create an Excel spreadsheet from your web page, populate it with data, and embed your Office Add-in

     

    Please note that implementing a custom web application would require more development effort and may involve hosting the application on a web server. It would provide a more tailored solution but would involve additional complexity compared to using built-in features within Excel Online.

    Consider your specific requirements and technical capabilities before choosing the appropriate approach for restricting access to rows based on the User ID in Excel Online.

    The text and steps were created with the help of AI.

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

  • Sim_Xun's avatar
    Sim_Xun
    Copper Contributor

    HaniroothC your this problem is solved? i also faced same problem with this, i need certain email (has been login) can edit certain row only in excel online

Resources