How to extract data from google sheets and store it to a global variable?

I have done many searching about how to connect the google sheet as a database,
I know it can just simply use OPEN LINK function to add the URL link to read the file,
but is there any ways to extract specific data to global variables?

For example, I want the data from Google sheet cell A3 and store it to a global variable. Is there any possible ways (e.g. Javascript, Ajax, etc.) that can help?


Obviously, it depends on what you are trying to do, but I’d just have an input field in the prototype somewhere into which I’d just paste the value I needed, then use an onClick to populate the variable from the input field. I’m not aware of any automatic way of reading data from a Google sheet into an Axure prototype.

1 Like

First, thanks for your reply.

Actually, I am going to do a survey app prototype. I have already got all questions and answers in the google spread sheet (let say 100 questions and each question has 5 multiple choice answers). I need to draw 10 questions and answers out of this 100 questions database and show it onto the app page by page. That makes me can’t put a input field in the prototype and input it one by one.
Do you have any idea on how to achieve this? Thanks.

If the data in the Google sheet isn’t changing, then I think your best bet is to paste it all into a repeater and manipulate it inside the prototype. You can with a bit of trial and error paste from a simple spreadsheet into the a repeater’s data table in my experience. Just set up the columns to match first.

Thanks, I will take your advice, but I still have a problem.

If the repeater dataset first column is “Question number” , 2nd column is “Question content”,
then how to load question No.10 on page1, load question No. 5 on page 2, question No. 6 on page 3…?

You could do that with queries on the repeater. Put the repeater in a master and then use each page’s onLoad event to run a query to show the row(s) that you need on each page.

Or even do it all on one page by just having a button that fires a query to the repeater each time it’s clicked (you would need a way of cycling through so maybe set a variable)

1 Like