[英]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我们有一个需求,在 Office 365 登录中有 excel 主表,列中有多个客户,我们必须开发一个插件,所以插件应该为每个客户创建一个单独的表,如果有任何更新在应该反映在客户表中的主表中,反之亦然
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感谢和问候巴拉 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.如果我正确理解您的场景,您可能已经有登录逻辑,因此您应该知道当前用户是谁,根据当前用户,您可以通过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.为了保持主工作表和客户分离工作表之间的同步,您可以监听工作表onChanged 事件,您可以在此事件中添加同步逻辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.