Expansion_Marketing Posted March 20 Share Posted March 20 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 Share Posted March 25 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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