Hi, guys.
Currently when executing the HTML file through custom input activity (CIU), I’m getting messages that indicate that some features from JS may not be available .
For example:
“Error: ‘Fetch’ is not defined.”
Now, if the problem arises from support issues (because IE11 doesn’t support FETCH), how should I approach this efficiently? Perhaps through Polyfill. I’m not sure.
This is the JS code:
function LeerDatos() {
fetch('Database/LineaYClases.xlsx')
.then(function(res){
// Qué hacer en caso de error
if (!res.ok) throw new Error("No se pudo leer la base de datos.");
return res.arrayBuffer();
})
.then(function(data){
// Leemos los datos
const rawData = new Uint8Array(data);
const workbook = XLSX.read(rawData,{type: "array"})
// Convertimos de Excel a JSON
// Obtenemos el nombre la primera hoja del libro
const firstSheetName = workbook.SheetNames[0];
// Leemos la primera hoja
const worksheet = workbook.Sheets[firstSheetName];
// Conversión
const jsonData = XLSX.utils.sheet_to_json(worksheet, {raw: true});
imprimirDatos(jsonData);
});
I’ve also got this meta tag in the HTML:
<meta http-equiv="X-UA-Compatible" content="IE=11" />
I’ve tried by changing it to “IE=edge” and “Chrome=1” but it’s not working.