Hey! I’ve done this before, and the easiest way to pull data from google sheet in javascript website is using the Sheets API v4.
Just make sure you enable the API in Google Cloud Console, grab an API key, and use fetch in your JS code.
Here’s a quick snippet:
```javascript
fetch(`https://sheets.googleapis.com/v4/spreadsheets/YOUR_SHEET_ID/values/Sheet1?key=YOUR_API_KEY`)
.then(response => response.json())
.then(data => console.log(data));
```
Avoid making the sheet public—it’s risky. CORS won’t be an issue with the API key.
Just make sure you enable the API in Google Cloud Console, grab an API key, and use fetch in your JS code.
Here’s a quick snippet:
```javascript
fetch(`https://sheets.googleapis.com/v4/spreadsheets/YOUR_SHEET_ID/values/Sheet1?key=YOUR_API_KEY`)
.then(response => response.json())
.then(data => console.log(data));
```
Avoid making the sheet public—it’s risky. CORS won’t be an issue with the API key.
