Daniel Bílek
Daniel Bílek

Reputation: 85

Google sheets API - Creating sheets properly

i am developing fitness app and i would like to use simple google sheets to fetch data from.

I would like to make something like:

Google sheets example

It is possible to structure document somehow and make it work? Or do i need to use something else? Thanks!

Upvotes: 0

Views: 45

Answers (1)

Ricardo Aranguren
Ricardo Aranguren

Reputation: 610

If you want to use google sheets as a database, you need to duplicate some of those values so that every row contains all the information you need.

For example, in a "Data" tab:

Week Training Area Exercise Sets Reps
1 Training 1 Upper body Rows 4 5
1 Training 1 Lower body Deadlift 4 5
1 Training 2 Upper body Bench 4 5
1 Training 2 Lower body Squat 4 5

Then you can fetch the data from other tabs. For example, say you have a tab with the week number in B1:

  1. Select B1, go to Data > data validation
  2. List from range: =Data!$A$2:$A
  3. Press Save and you have a nice drop-down selector for the week numbers
  4. in an empty cell put: =filter(Data!B:F,Data!A:A=B1)

And this is just an example. You can fetch your information with filters, VLookups, query...

Upvotes: 1

Related Questions