简体   繁体   中英

Excel Web Addin how to hide work sheet on user based and access the folder in office 365 in which the excel is saved

We have a requirement in which there is excel master sheet in the Office 365 login with multiple customers in a column, and we have to develop an add-in, so add in should create a separate sheet for each customer and if there is any update in the master sheet that should be reflected in customer sheet and vice versa

We have managed to create a separate sheet for each customer in a single workbook, using add-in and update from master to customer and customer to master is handled in on data changed event,

but this customer should be able to view only their sheet and the other customer sheet should be invisible for them, is there is an option to identify the customer who is accessing their sheet and give them permission and we also need to send a notification to particular customer if the there are any changes in the master sheet and also we need to write a log file if there is any modification is done by the customer in their respective sheet.

Thanks and Regards Bala V

If I understand your scenario correctly, you may already have a login logic, therefore you should know who is the current user, based on the current user, you can hide the worksheet by worksheet.visibiliy API. I would suggest you set other customer's worksheets as very hidden, therefore end-users won't easily unhide the worksheet.

worksheet.visibility = "VeryHidden";

In order to keep sync between the master worksheet and the customer seperated worksheet, you could listen worksheet onChanged event , You can add the sync logic in this event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM