Move focus from Taskpane to Sheet with Excel Javascript API

Move focus from Taskpane to Sheet with Excel Javascript API
1

Upvotes

Upvote

 Apr 24 2022
1 Comments (1 New)
New

Would be awesome to have a feature in the Javascript Excel Api where you could move focus from taskepane to the sheet, so user could use arrow keys to navigate the sheet right away without having to click on the sheet before.

 

For example if you have taskpane with many different formatting options available, it would be great to navigate the sheet with arrows keys and select proper formatting for cells without having to click to the sheet to restore the focus there.

The API could look something like this.

await Excel.run(async (context) => {
    let sheet = context.workbook.worksheets.getItem("Sample");
    sheet.activate();
    sheet.focus(); //Maybe something like this?
    await context.sync();
});


I am very sorry if this feature already exists and I am just not aware of it.

 

This topic has been discussed also on this Stack Overflow thread:
https://stackoverflow.com/questions/71969159/move-focus-from-taskpane-to-sheet-with-excel-javascript-api

 

Comments
Occasional Visitor

I have the same issue for Word. After clicking a button in the taskpane the focus stays on taskpane. But I want to change the focus to the text in the document I inserted with the click-function of the button.