As long as there are no way to 'Load' an Excel template in the client's Workbook using Javascript API for office, Is it possible to download the file through the browser's Add In? So the user can manually open it.
You could do something like:
saveFileToDesktop(blob, fileName) {
if (window.navigator.msSaveOrOpenBlob) { // IE only
window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
const link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
link.click();
}
}
This was working for me in the following combinations:
Client Windows Office(Excel, PowerPoint) & IE (because that is used in the taskpane)
Client Office Online(Excel, PowerPoint) & IE, Chrome, Safari, Firefox
not Working in:
Client Mac Office(Excel, PowerPoint) & Safari (because that is used in the taskpane)
It seems that download goes ok but I was not able to get to the file even tried changing preferences File download location: Ask for each download etc. but was not able to get it working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With