I want a google spread sheets using p5!

I have a Google Spreadsheet with full access.

And I want to add new content to the Google Spreadsheet using p5js.

Can I…? What should I do?

You should use the API that Google has provided.

You can do it using Node.js, so you should be able to do it using p5.js too.

I’d start here: https://codelabs.developers.google.com/codelabs/sheets-api/#0

1 Like

Sheetsu can be good for this. You give it a (public) google spreadsheet URL and it gives you JSON that its easily compatible with loadJSON in p5. It’s very easy to use, but the downside is that after your free trial expires, you need to purchase a subscription and it is not cheap.

1 Like

I went into the link and looked at it, but it’s not easy for me.

It’s my scenario.

  1. Create a game using p5js.
  2. At the end of the game, the user’s name and score will be added to the Google Spreadsheet.
  3. You can see the name and the score in the game.

Is this possible with the API provided by Google?

Is it possible? Yes, it should be.

I suggest you follow the tutorial as it is, and only add Processing to it AFTER you have a node.js application working & communicating with Google Sheets.

It’s a ton of effort though.

Does your sketch really need a global high scores table? A local one is much easier to do…

The “easiest” way is embed p5 in Apps Script like this…

…and make calls to your backend spreadsheet with google.script.run like this…
https://developers.google.com/apps-script/guides/html/reference/run