# I want a google spread sheets using p5!

**URL:** https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632
**Category:** Coding Questions
**Created:** [August 14, 2018, 9:27am UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632 "2018-08-14T09:27:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![fankimm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fankimm/32/1119_2.png) [@fankimm](https://discourse.processing.org/u/fankimm)
#### Post date: [August 14, 2018, 9:27am UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/1 "2018-08-14T09:27:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [August 14, 2018, 10:18am UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/2 "2018-08-14T10:18:10Z")

</div>

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](https://codelabs.developers.google.com/codelabs/sheets-api/#0)

---

<div class="post-metadata">

### Author: ![kjhollen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kjhollen/32/23_2.png) [@kjhollen](https://discourse.processing.org/u/kjhollen)
#### Post date: [August 14, 2018, 2:11pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/3 "2018-08-14T14:11:43Z")

</div>

[Sheetsu](https://sheetsu.com/) 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.

---

<div class="post-metadata">

### Author: ![fankimm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fankimm/32/1119_2.png) [@fankimm](https://discourse.processing.org/u/fankimm)
#### Post date: [August 17, 2018, 2:34pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/4 "2018-08-17T14:34:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [August 17, 2018, 3:00pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/5 "2018-08-17T15:00:57Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![everythingability](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/everythingability/32/937_2.png) [@everythingability](https://discourse.processing.org/u/everythingability)
#### Post date: [November 11, 2019, 5:25pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/6 "2019-11-11T17:25:33Z")

</div>

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

> <https://stackoverflow.com/questions/46695801/is-it-possible-to-use-the-p5-js-library-in-google-apps-script>

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

---

<div class="post-metadata">

### Author: ![BarryJ](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@BarryJ](https://discourse.processing.org/u/BarryJ)
#### Post date: [May 1, 2020, 5:42pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632/7 "2020-05-01T17:42:31Z")

</div>

Not p5.js, but you can do this without writing custom code using [https://sheet2api.com/](https://sheet2api.com/) . Also works for Excel Online but haven’t tried that yet.
