excel2table
excel2table copied to clipboard
rendering a blob gives RuntimeError: unreachable
Hi,
I was trying to render a xlsx as a blob but without success.
In every attempt this RuntimeError: unreachable error shows up:

here is what i tried to do:
import { render } from 'excel2table';
function init() {
const url = '[url_to_xlsx_file]';
getBlob(url).then((blob) => { render('#xlsx-preview', blob, { scales: true }) });
}
async function getBlob(url) {
const blob = await fetch(url).then(r => r.blob());
return blob; // Blob {size: 3410648, type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}
}
init();
i tried to render a URL.createObjectURL(blob) too, but it gave me the same error.
It's something that i'm doing wrong?
Thanks. Regards.