BLOCKS Reference

Block Reference

G Suite

Create spreadsheet

This BLOCK is currently in beta. The beta version will become unusable after the official version is released.

Some functions may not work properly during the beta. We appreciate your feedback regarding bugs or ways to improve MAGELLAN BLOCKS.

Overview

This BLOCK creates a Google Sheets spreadsheet in Google Drive.

If successful, it outputs a URL for the new spreadsheet as a log. This URL can be used to access the spreadsheet.

Permission is required to access the spreadsheet. You can give access permission by configuring sharing settings within the advanced properties of this BLOCK, or by connecting a Share items from Google Drive BLOCK.

You must set a variable as the contents for the new spreadsheet. The data stored in the variable should be an array of objects.

Refer to the following chart and explanations for more information about this data type (first row is the header row):

Column Title 1 Column Title 2 Column Title 3
"foo" 123 1.3
"bar" 456 4.6
"baz" 789 7.9
  • Express the data as an array that contains each row of data as an object.
  • Each object consists of a key and value pair to express each column of data.
    • Set each key as the header for each column.
    • Set the value as the data in each column.

Below are examples of expressing the data using JSON and the Construct object BLOCK:

  • JSON:
    [
      {"Column Title 1": "foo", "Column Title 2": 123, "Column Title 3": 1.3},
      {"Column Title 1": "bar", "Column Title 2": 456, "Column Title 3": 4.6},
      {"Column Title 1": "baz", "Column Title 2": 789, "Column Title 3": 7.9}
    ]
    
  • Construct object BLOCK:
    Create spreadsheet BLOCK: data with the Construct object BLOCK

Properties

Property Explanation
BLOCK name Configure the name displayed on this BLOCK.
GCP service account Select the GCP service account to use with this BLOCK.
File name

Designate the file name for the new spreadsheet.

Input variable

Designate the variable that contains the data to write to the new spreadsheet.

BLOCK memos Make notes about this BLOCK.
Worksheet name

Designate the name of the worksheet within the new spreadsheet. A worksheet name will be automatically assigned if you leave this field blank.

Starting cell (A1 notation) Designate the starting cell (A1 notation) for writing to the worksheet.
Output header line

Select whether or not to output the header line.

  • Check the box to include the header line in the output.
  • Remove the check to not include the header line in the output.
Grantee type

Select who to share the spreadsheet with.

  • Specific users: Share with users that you specify.
  • Group: Share with a Google group that you specify.
  • Domain: Share with a G Suite domain that you specify.
  • Anyone on the web: Allow anyone access to the item.
Role granted

Select the role to give to those you share the spreadsheet with.

  • Editor: Can edit the spreadsheet.
  • Commenter: Can view and comment on the spreadsheet.
  • Viewer: Can only view the spreadsheet.
Email address

When Grantee type is set to Specific users or Group, designate the email address of those you want to share the spreadsheet with.

  • Specific users: Designate the email address of a user.
  • Group: Designate the email address of a Google group.
Domain When Grantee type is set to Domain, designate a G Suite domain.
Allow file discovery

When Grantee type is set to Domain or Anyone on the web, designate whether or not to have the spreadsheet appear in search results.

  • Check the box to allow others to find the spreadsheet in search.
  • Remove the check to not allow others to find the spreadsheet in search.