Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
Move focus from Taskpane to Sheet with Excel Javascript API

I am working on an Excel Add in using Excel Javascript API.

https://docs.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!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The best what you could do is to try to Set the active worksheet:

await Excel.run(async (context) => {
    let sheet = context.workbook.worksheets.getItem("Sample");
    sheet.activate();
    sheet.load("name");

    await context.sync();
    console.log(`The active worksheet is "${sheet.name}"`);
});

If this isn't what you are looking for, I'd suggest you to file a feature request here: https://aka.ms/M365dev-suggestions .

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda