Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

170
Vistas
Downloading files in browser window after opening in Javascript?

Im trying to open a browser in Javascript and use that browser to download a file. I am doing this in a Microsoft Excel Add-in. The reason is because on MacOS on the desktop version of Excel, you cannot currently download files to the desktop via the addin.

According to the team, the workaround is to use: Office.context.ui.openBrowserWindow(url) to open the url and download the file once the browser is open.

But how do I download the file once its open? Ive tried doing something like:

Office.context.ui.openBrowserWindow("https://google.com", function() {
  const bl = new Blob([JSON.stringify(data, null, 2)], {type: "application/json"});
  const a = document.createElement("a");
  a.href = URL.createObjectURL(bl);
  a.download = "test.json";
  document.body.appendChild(a);
  a.click();
})

but im getting nothing working.

Any advice?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

openBrowserWindow doesn't take a second parameter.

I think the workaround is that you create a page on your add-in domain that has a UI for downloading the file. Then you use openBrowserWindow to open that page.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda