Message Boards Message Boards

Referring to a range of cells with EmbedCode[...,"GoogleDocs"]

Posted 10 years ago

This post shows how to refer to a range of cells when using EmbedCode[..., "GoogleDocs"]

It assumes you have read these two previous posts:

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:

enter image description here

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:

enter image description here

Note that updating any of the values in the range B2:B11 will cause a recomputation of the cloud evaluation as well.

POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract