Pull Data From a Google Sheet

I use the following snippet to send progress updates to my students. I currently upload their data from Excel to DataBlaze and then have the snippet pull it from there. Does anyone know of a way to accomplish this without uploading the data to DataBlaze?

{dbselect: SELECT `First Name`, `Last Name`, `Course Work Current Grade`, `Number Assignments Submitted Last Week`, `Last Assignment Turned In Date`, `Estimated Completion Date`, `Number Weeks Behind`, `Weeks Active` FROM `SMC 8-14`; space=7ms8FBnhiSYmmS8Srxj8LF; menu=yes}

{endnote}{import: /import-hello}{=`first name`}!

You are doing {random-text: terrific, phenomenal, outstanding, extraordinary, incredible} in this segment!
Here is your progress so far:

Weeks Active: {=`weeks active`}
Current Grade: {=`course work current grade`}%
Number of assignments submitted last week: {=`number assignments submitted last week`}
Last assignment submitted on: {=`last assignment turned in date`}
Estimated completion date for current segment: {=`estimated completion date`}

FUN question: Would you rather have 5 good friends or 1 best friend?

@Jennifer_Saavedra i tried to help another customer with a similar request a few weeks back. it's technically possible to bring data into Text Blaze from a Google Sheet, but it's then very hard to actually use that data effectively (breaking it into its component columns and rows). If it's just a single column of data it's not so bad, but even 2 columns started to get tricky.

I wonder if any of our engineers have any suggestions about a way to make it so you don't have to manually do that upload though :thinking:

That makes sense Andrew! I am trying to see if I can use any of the formulas to copy one row from a Google sheet into a textbox and then have formulas to grab the second item in the textbox and the fourth item in the box, etc. I'm still trying to figure out which formulas work best for that scenario. Thank you for your help though.

@Jennifer_Saavedra what you describe would be possible, good thinking.

When you copy a row from Google Sheets, it separates the values with a tab. You could then use the split function to turn that copied row into a list, splitting it by the tabs. Finally, use the position in the list to call up that specific data.

For instance:

{sheetsdata=split({clipboard}, "\t")}

First item from the copied row: {=sheetsdata[1]}

Second item from the copied row: {=sheetsdata[2]}

etc...

Try copying that snippet to your account, then putting a single row of data from Google Sheets onto your clipboard. Then, use that snippet. That should show you how it works.

1 Like

Thank you Andrew! That worked perfectly! This is a grat place for me to start and see what else I can invent.