Expansion_Marketing Posted March 20, 2023 Share Posted March 20, 2023 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> Link to comment
tuanphan Posted March 25, 2023 Share Posted March 25, 2023 Where did you add? And this code for? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment