SharePoint can't create Excel report in IE
Good day,
I have the script to create Excel report. It works fine for me in IE. But another users can't unload Excel report in IE. If I click F12, I see this error "it is impossible to create an object by the object programming server" after string
var oExcel = new ActiveXObject("Excel.Application");
This information didn't help https://support.microsoft.com/en-us/office/enable-activex-controls-in-internet-explorer-04774c30-617d-4de4-a028-0fe03d68b955?ui=en-US&rs=en-US&ad=US
How can I create Excel report without ActiveXObject?
I use SharePoint 2016. My script
64396-scriptexample.txt
And I tried to use https://github.com/SheetJS/sheetjs/blob/master/README.md
My exportToExcel function became
function exportToExcel() {
var workbook = XLSX.utils.book_new();
var ws1 = XLSX.utils.table_to_sheet(document.getElementById('popular'));
XLSX.utils.book_append_sheet(workbook, ws1, "Sheet1");
/* bookType can be any supported output type */
var wopts = { bookType:'xlsx', bookSST:false, type:'array' };
var wbout = XLSX.write(workbook,wopts);
var fileName ="test.xlsx";
try {
var file = new File([wbout], fileName, { type: "application/octet-stream" });
saveAs(file);
} catch (err) {
var blob = new Blob([wbout], { type: "application/vnd.ms-excel" });
saveAs(blob, fileName);
}
}
It works in FireFox and Google Chrome. But if I run it in IE, I see the word"downloading" only. How can I save excel file in IE 11?