Creates a spreadsheet, returning the newly created spreadsheet.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/spreadsheets

If unset, the scope for this method defaults to https://www.googleapis.com/auth/drive. You can set the scope for this method like this: sheets4 --scope <scope> spreadsheets create ...

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

Spreadsheet:
  properties:
    auto-recalc: string
    default-format:
      background-color:
        alpha: number
        blue: number
        green: number
        red: number
      background-color-style:
        rgb-color:
          alpha: number
          blue: number
          green: number
          red: number
        theme-color: string
      borders:
        bottom:
          color:
            alpha: number
            blue: number
            green: number
            red: number
          color-style:
            rgb-color:
              alpha: number
              blue: number
              green: number
              red: number
            theme-color: string
          style: string
          width: integer
        left:
          color:
            alpha: number
            blue: number
            green: number
            red: number
          color-style:
            rgb-color:
              alpha: number
              blue: number
              green: number
              red: number
            theme-color: string
          style: string
          width: integer
        right:
          color:
            alpha: number
            blue: number
            green: number
            red: number
          color-style:
            rgb-color:
              alpha: number
              blue: number
              green: number
              red: number
            theme-color: string
          style: string
          width: integer
        top:
          color:
            alpha: number
            blue: number
            green: number
            red: number
          color-style:
            rgb-color:
              alpha: number
              blue: number
              green: number
              red: number
            theme-color: string
          style: string
          width: integer
      horizontal-alignment: string
      hyperlink-display-type: string
      number-format:
        pattern: string
        type: string
      padding:
        bottom: integer
        left: integer
        right: integer
        top: integer
      text-direction: string
      text-format:
        bold: boolean
        font-family: string
        font-size: integer
        foreground-color:
          alpha: number
          blue: number
          green: number
          red: number
        foreground-color-style:
          rgb-color:
            alpha: number
            blue: number
            green: number
            red: number
          theme-color: string
        italic: boolean
        link:
          uri: string
        strikethrough: boolean
        underline: boolean
      text-rotation:
        angle: integer
        vertical: boolean
      vertical-alignment: string
      wrap-strategy: string
    iterative-calculation-settings:
      convergence-threshold: number
      max-iterations: integer
    locale: string
    spreadsheet-theme:
      primary-font-family: string
    time-zone: string
    title: string
  spreadsheet-id: string
  spreadsheet-url: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .properties auto-recalc=takimata
    • The amount of time to wait before volatile functions are recalculated.
  • default-format.background-color alpha=0.38370480861420864
    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.7896128249156874
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.9217265098962596
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.30763338797950246

    • The amount of red in the color as a value in the interval [0, 1].
  • ..background-color-style.rgb-color alpha=0.9922470725858205

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.20494600207758173
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.6562776331888889
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.912305342889376

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=invidunt

    • Theme color.
  • ..borders.bottom.color alpha=0.42548765853373427

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.635197500875138
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.9001265173058445
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.5053930334687853

    • The amount of red in the color as a value in the interval [0, 1].
  • ..color-style.rgb-color alpha=0.6681221451468909

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.888331125703361
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.4033695817113857
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.737544430792817

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=gubergren

    • Theme color.
  • .. style=ea

    • The style of the border.
  • width=2

    • The width of the border, in pixels. Deprecated; the width is determined by the "style" field.
  • ..left.color alpha=0.8325065326181772

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.5944568076620798
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.46093367968783205
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.9575633866430626

    • The amount of red in the color as a value in the interval [0, 1].
  • ..color-style.rgb-color alpha=0.7957202632117738

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.31372789799617684
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.6905413711203235
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.9150999978526841

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=sed

    • Theme color.
  • .. style=et

    • The style of the border.
  • width=33

    • The width of the border, in pixels. Deprecated; the width is determined by the "style" field.
  • ..right.color alpha=0.8039909988714865

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.5477575441248734
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.6383502522516505
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.9694857568940014

    • The amount of red in the color as a value in the interval [0, 1].
  • ..color-style.rgb-color alpha=0.9697780726648698

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.7735052857092053
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.07223777776561668
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.9625057030686941

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=et

    • Theme color.
  • .. style=sadipscing

    • The style of the border.
  • width=86

    • The width of the border, in pixels. Deprecated; the width is determined by the "style" field.
  • ..top.color alpha=0.017140519879742522

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.19681975392268636
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.10459029141758258
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.19657477328425788

    • The amount of red in the color as a value in the interval [0, 1].
  • ..color-style.rgb-color alpha=0.7491113388279885

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.9996547162401588
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.5686782919934609
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.012465497817154336

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=accusam

    • Theme color.
  • .. style=takimata

    • The style of the border.
  • width=55

    • The width of the border, in pixels. Deprecated; the width is determined by the "style" field.
  • ... horizontal-alignment=voluptua.

    • The horizontal alignment of the value in the cell.
  • hyperlink-display-type=et
    • If one exists, how a hyperlink should be displayed in the cell.
  • number-format pattern=erat
    • Pattern string used for formatting. If not set, a default pattern based on the user's locale will be used if necessary for the given type. See the Date and Number Formats guide for more information about the supported patterns.
  • type=consetetur

    • The type of the number format. When writing, this field must be set.
  • ..padding bottom=99

    • The bottom padding of the cell.
  • left=71
    • The left padding of the cell.
  • right=92
    • The right padding of the cell.
  • top=82

    • The top padding of the cell.
  • .. text-direction=gubergren

    • The direction of the text in the cell.
  • text-format bold=false
    • True if the text is bold.
  • font-family=accusam
    • The font family.
  • font-size=23
    • The size of the font.
  • foreground-color alpha=0.5290758052968516
    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.5284480987860815
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.7753213022845796
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.05043422241780038

    • The amount of red in the color as a value in the interval [0, 1].
  • ..foreground-color-style.rgb-color alpha=0.4946595631810975

    • The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
  • blue=0.7364988594037298
    • The amount of blue in the color as a value in the interval [0, 1].
  • green=0.4551855025693473
    • The amount of green in the color as a value in the interval [0, 1].
  • red=0.8987894283575105

    • The amount of red in the color as a value in the interval [0, 1].
  • .. theme-color=et

    • Theme color.
  • .. italic=true

    • True if the text is italicized.
  • link uri=aliquyam

    • The link identifier.
  • .. strikethrough=true

    • True if the text has a strikethrough.
  • underline=true

    • True if the text is underlined.
  • ..text-rotation angle=33

    • The angle between the standard orientation and the desired orientation. Measured in degrees. Valid values are between -90 and 90. Positive angles are angled upwards, negative are angled downwards. Note: For LTR text direction positive angles are in the counterclockwise direction, whereas for RTL they are in the clockwise direction
  • vertical=false

    • If true, text reads top to bottom, but the orientation of individual characters is unchanged. For example: | V | | e | | r | | t | | i | | c | | a | | l |
  • .. vertical-alignment=no

    • The vertical alignment of the value in the cell.
  • wrap-strategy=et

    • The wrap strategy for the value in the cell.
  • ..iterative-calculation-settings convergence-threshold=0.9478375320054573

    • When iterative calculation is enabled and successive results differ by less than this threshold value, the calculation rounds stop.
  • max-iterations=21

    • When iterative calculation is enabled, the maximum number of calculation rounds to perform.
  • .. locale=no

    • The locale of the spreadsheet in one of the following formats: * an ISO 639-1 language code such as en * an ISO 639-2 language code such as fil, if no 639-1 code exists * a combination of the ISO language code and country code, such as en_US Note: when updating this field, not all locales/languages are supported.
  • spreadsheet-theme primary-font-family=nonumy

    • Name of the primary font family.
  • .. time-zone=at

    • The time zone of the spreadsheet, in CLDR format such as America/New_York. If the time zone isn't recognized, this may be a custom time zone such as GMT-07:00.
  • title=sadipscing

    • The title of the spreadsheet.
  • .. spreadsheet-id=aliquyam

    • The ID of the spreadsheet. This field is read-only.
  • spreadsheet-url=dolores
    • The url of the spreadsheet. This field is read-only.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").