I have injected code using html and java script but it is not displaying anything. Any help would be appreciated.
<script>const sheetId = '16e1s9-BJDLh-evTsbSnZunE9KkhSlqVdfvLIHhw9BeQ';
const range = 'Sheet1!A1:C10'; // Replace with the range of cells where your data is located
const url = `https://docs.google.com/spreadsheets/d/${sheetId}/values/${range}?key=AIzaSyB0iPz1HM2uQtSIRUN3tr-q70jLEUPsm9o`;
fetch(url)
.then(function(response) {
return response.json();
})
.then(function(data) {
// Find the row that matches the web element with the ID of bWIRlk1WzjWYmmolriHL
const row = data.values.find(function(row) {
return row[0] === 'bWIRlk1WzjWYmmolriHL';
});
if (row) {
// Update the webpage with the data from the matching row
const webElement = document.getElementById('bWIRlk1WzjWYmmolriHL');
webElement.textContent = row[1];
}
})
.catch(function(error) {
console.error(error);
});
</script>