Export to CSV error

the forWriting.gotText block is suppose to call the same url, as the url should be updated after the button is clicked, and then it'll refresh the list view on app. The sheet is getting the data, so the url's and buttons are working just fine, it just wont export it to csv for ai to pull data from.

OK, sorry, of course you are using two different web components :upside_down_face:

Can you show your responseContent ? (paste here as text)

I'm confused, what do you mean?

I am assuming you are running your project in companion?
Set a textbox (you can then copy the output) to:

image

and report back the output here. There is something odd about the data that is being returned.

Alternatively, show a screenshot of your google sheet data, that may shed some light.

I mean this:

I'm not running it in companion... I just build it on the site and then use the emulator.

Here are screen shots of the raw sheet and also the form that the app fills out.

Also, here's the video I watched to come up with this code

Now show the full url you are using to call the data from the sheet - forReading url (you can remove some characters from the sheet ID if you want).

https://docs.google.com/spreadsheets/d/1Oc-3BOmnUZMx0aBb1-plfYRGS4BSuOSSIpRRLHs0RSc/export?format=csv

Well that is OK. With no data in there you will be loading an empty list to the listview.

Are you still getting the error at Screen1.Initialise after reading the spreadsheet ?

Yes, I get the error both when I start the app and also when I click the button

Can you upload an aia project here so I can test it?

http://ai2.appinventor.mit.edu/b/acfw

That link doesn't work, you need to download the project to your computer, then upload it here. It will be an .aia file.

Car_Times.aia (10.0 KB)

Great, give me a couple of minutes....

1 Like

Working fine here, no error, adding employees and returning list OK (you have a couple of entries in your sheet now). :wink:

Try coming out of Ai2 and restarting your app.

1 Like

I guess it's just the emulator. Downloaded apk onto phone and it worked fine.

Thanks man. Next time I will download APK and check that first.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.