简体   繁体   English

Excel Web 添加如何基于用户隐藏工作表并访问 Office 365 中保存 excel 的文件夹

[英]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.

相关问题 如何从 Office 365 Excel Web 插件访问 Windows 剪贴板? - How to access to windows clipboard from office 365 Excel web addin? VBA不在受保护的工作表上更新— Excel Office 365 - VBA not updating on Protected Sheet — Excel Office 365 如何获取对象和 VBA 函数在 Office 365 的 Excel 中工作? - How to get objects and VBA functions to work in Excel for Office 365? 如何在 Excel 2016/2019 中的 Personal Macro 文件夹外保存的 .XLAM 插件中引用 Excel 宏(不是函数)? - How to refer to Excel macros (not functions) in .XLAM addin saved outside Personal Macro folder in Excel 2016/2019? 如何将图像插入到 Office 365 Excel 中的单元格中? - How to insert an image into a cell in office 365 Excel? 使用 office js web 插件将 json 加载到 excel 中 - load json into excel using office js web addin Excel加载项事件:如何显示一个对话框,询问用户是否应保存工作簿? - Excel AddIn Event: How to display a dialog asking the user whether the workbook should be saved? 如何使用office script excel online在office 365中发送电子邮件 - How to send email in office 365 using office script excel online 将整列(基于特定标题)从一张工作表复制到另一张工作表(以其他顺序)在 Excel 365 上不起作用 - Copy entire columns (based on specific headers) from one sheet to another (in other order) does not work on Excel 365 以编程方式在Office 365上读/写Excel Web App - Programmatically read/write Excel Web App on Office 365
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM