我正在使用Excel JavaScript API进行Excel添加。
有没有办法将焦点从Taskepane切换到工作表?现在,如果用户单击Taskpane上的元素,她将无法使用箭头键来导航Excel表,直到她再次使用鼠标单击了纸板区域为止。
用例
在Taskpane上有一个按钮,可以将文本粘贴到表格上的一定范围,并且还将将焦点移至表格上,这是很不错的,因此在按下按钮后,用户可以立即开始使用箭头键导航。
将文本粘贴到范围并设置选择效果很好,但是我找不到使用JS API将焦点从Taskpane转移到工作表的方法。
非常感谢任何帮助,
谢谢你!
I am working on an Excel Add in using Excel Javascript API.
https://learn.microsoft.com/en-us/office/dev/add-ins/reference/overview/excel-add-ins-reference-overview
Is there a way to switch focus from taskpane to the sheet? Now if user clicks on an element on the taskpane she cannot use the the arrow keys to navigate the excel sheet until she has clicked the sheet area again with the mouse.
Use case
It would be nice to have a button on the taskpane that would paste text to a certain range on the sheet and would also move the focus to the sheet, so the user could start navigating with arrow keys immediately after pressing the button.
Pasting the text to the range and setting the selection are working fine, but I cannot find a way to move focus from the taskpane to the sheet with JS API.
Any help is very much appreciated,
Thank you!
发布评论
评论(1)
最好的办法是尝试设置活动工作表:
如果这不是您想要的,我建议您在此处提交功能请求: https://aka.ms/m365dev-suggestions 。
The best what you could do is to try to Set the active worksheet:
If this isn't what you are looking for, I'd suggest you to file a feature request here: https://aka.ms/M365dev-suggestions .