I am developing an Excel add-in using Office JS in which a user can decide to open a document from a remote server API. In that case I need to receive a file from the server API and open it in Excel.
I already found this answer: Programatically open a excel document using javascript office api
So I see that the API does not allow this, and the answer suggests triggering the download using JS.
So I added an iframe to the addin page:
<iframe id="download" width="1" height="1" style="display:none"></iframe>
And to trigger the document download I am doing:
document.getElementById("download").src = downloadURL;
That works perfectly when trying online (Office 365).
But it is not downloading the document using the desktop version.
How can I make the solution word in desktop Excel application?
