6
$\begingroup$

I would like to use the IMPORTDATA Google Sheets function to load a Wolfram Cloud API into my Spreadsheet. How can I do that?

$\endgroup$

1 Answer 1

8
$\begingroup$

Yes, it's possible to do that. Here is a toy code.

CloudDeploy[
 APIFunction[{}, Function[{}, Table[10 i + j, {i, 10}, {j, 4}]], "CSV"]
 , "csv-test-data", Permissions -> "Public"
 ]

CloudObject["https://www.wolframcloud.com/obj/your-user/csv-test-data"]

Then just go to you sheet and use the IMPORTDATA function like this: =IMPORTDATA("https://www.wolframcloud.com/obj/your-user/csv-test-data")

Voialà! Here is the result

enter image description here

Limitation:

  • Your data has to be public
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.