Sending data from Construct 2/3 to Google Spreadsheet

You're viewing a single comment in a conversation. View all the comments
  • 5 Comments

  • Order by
  • Hi dop2000 , this was a great tutorial and what i was looking for!

    My problems is that im trying to send values from an array but it seems that whenever it is sent to google sheets, its no longer arranged like it was on the array. Do you have any insight or solution regarding this?

    Thank you!

    • Don't know, sorry. Maybe you are sending the data in wrong order. Are you sending it with multiple AJAX requests, each array value separately? You should probably send the entire array at once, and parse all values in the gs script.

      • Im sending it this way:

        For each X element

        Set s as Variable1 & "?name=" & URLEncode(03_Live_stats.At(Variable2,0))

        then AJAX sends

        Variable2 is adding +1 every X element so im sending 10 elements/value of the array so i guess youre right, im sending it 1 by 1..

        How would i even send the entire array? any tips you can provide so ill know where to start

        • Is "AJAX Send" inside the For Each loop? It needs to be outside. Inside the loop you add all array elements into one string, which at the end should look something like this:

          "?name1=Joe&name2=Pete&name3=Mary" (names can be URL-encoded)

          Then send this string with AJAX once.

          • Ill try to open a discussion tom and will tag you to it so ican show you what my codings are (which are not far from whats yours). It that is okay? Thanks.