const script = document.createElement("script");
script.src = "https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js";
script.onload = function() {
// Zodra de SheetJS library geladen is, start het ophalen van de Excel-data
fetchExcel();
};
document.head.appendChild(script);
async function fetchExcel() {
const url = 'https://weespfc-my.sharepoint.com/:x:/g/personal/schoolvoetbal_fcweesp_nl/ESHQUaPEePNFqop0hU77d_wBh3osMcN-hyplXAWSPe0Rhw?e=kIoVdY';
const response = await fetch(url);
if (!response.ok) throw new Error("Kan het Excel-bestand niet ophalen");
const workbook = XLSX.read(arrayBuffer, { type: "array" });
const worksheet = workbook.Sheets["Blad1"];
const cellAddress = "B2";
const cell = worksheet[cellAddress];
const value = cell ? cell.v : "Geen waarde gevonden";
const outputElement = document.getElementById('outputCounter');
if (outputElement) {
outputElement.textContent = value;
} else {
console.error("Element met id 'outputCounter' niet gevonden");
}
} catch (error) {
console.error('Fout bij het ophalen van het Excel-bestand:', error);
document.getElementById('outputCounter').textContent = "Fout bij laden";
}
}
setInterval(fetchExcel, 30000);

Report
All responses (
Answers (