arnoudb
(Arnoud Buzing)
November 12, 2014, 10:51pm
1
This post shows how to refer to a range of cells when using EmbedCode[…, “GoogleDocs”]
It assumes you have read these two previous posts:
For the basics of embedding Wolfram Language functions in Google Docs spread sheets, please see:
https://wolfram.discourse.group/t/3974/1
In this post we will show how to reference other spreadsheet cells with your embedded Wolfram Language cloud calls.
First create the following spreadsheet as shown (with two column labels and some numbers in the A column):
[embed8.PNG]
Now click on the cell B2 and type:
=wolframCloudCall(A2)
[embed9.PNG]
And then hit enter to get the answer:
[e…
This post is related to an earlier post on this topic , but it is written (and meant to be read) as a standalone post.
Starting with Mathematica 10.0.1 (and also available in the Wolfram Programming Cloud) you can use "GoogleDocs" as an EmbedCode environment. For example you can do the following:
EmbedCode[ APIFunction[ {"x"->"Number"}, #x^2& ], "GoogleDocs"]
[qh4HJTM.png]
Now open Google Docs (http://docs.google.com ) and open a new spreadsheet (select "Sheets" from the top left menu):
…
First create the EmbedCode, as usual:
EmbedCode[ APIFunction[{“x” → DelimitedSequence[“Number”]}, N[Mean[#x ]] &], “GoogleDocs”]
In this case, we are going to process a list of numbers, using DelimitedSequence[“Number”] as the type. We use this
list to calculate the Mean (numerically).
Copy and paste the generated code into the Google Docs script editor and save it.
Next, set up a spreadsheet with a column of numbers, for example:
In this case cell B13 holds the Wolfram Cloud call. You can specify the range as usual (in this case with B2:B11).
Hitting enter will cause the cloud evaluation to take place:
Note that updating any of the values in the range B2:B11 will cause a recomputation of the cloud evaluation as well.
2 Likes