Cavalry
  • Welcome
  • Getting Started
    • Requirements
    • Installation
    • Sign In
      • Proxy Server
    • Quick Start
    • Example Files
    • Key Concepts
      • Nodes
      • Connections
      • Context
  • User Interface
    • Menus
      • File menu
      • Edit menu
      • View menu
      • Composition menu
      • Create menu
      • Animation menu
      • Shape menu
      • Tool menu
        • Select tool
        • Edit Shape tool
        • Pen tool
        • Pencil tool
        • Line tool
        • Text tool
        • Rectangle tool
        • Ellipse tool
        • Polygon tool
        • Star tool
        • Arc tool
        • Super Ellipse tool
        • Cog tool
        • Arrow tool
        • Capsule tool
      • Window menu
        • Align Window
        • Animation Utilities
        • Assets Window
          • Google Sheets Asset
          • Image Sequences
          • Project Settings
        • Attribute Editor
          • Control Rows
            • Controls Rows - Types
            • Control Rows - Interaction
        • Color window
          • Palettes
        • Control Center
        • Quick Add window
        • Flow Graph
        • Glyph Browser
        • Playback Controls
        • Preferences
        • Render Manager
          • Lottie Export
          • Dynamic Rendering
          • Render Tokens
        • Scene Window
          • Scene Tree
            • Composition Settings
          • Time Editor
          • Graph Editor
          • Keyframe Layers
        • Shelf
        • Tags
        • Toolbar
        • Viewport
          • Rulers
      • Help menu
    • Widgets
      • Gradient
      • Graph Attribute
    • General
      • Aliasing
      • Blend Modes
      • Distribution Types
        • Array Distribution
        • Circle Distribution
        • Fibonacci Distribution
        • Grid Distribution
        • Linear Distribution
        • Mask Distribution
        • Math Distribution
        • Path Distribution
        • Point Distribution
        • Random Distribution
        • Rose Distribution
        • Shape Edges Distribution
        • Shape Points Distribution
        • Shuffle Distribution
        • Sub-Mesh Distribution
        • Voxelize Distribution
      • Color Management
      • Motion Blur
      • Vector artwork support
  • Nodes
    • Shapes
      • Common Attributes (Shapes)
      • Background Shape
      • Basic Line
        • Bézier
        • Line
        • Spiral
      • Basic Shape
        • Arc
        • Arrow
        • Capsule
        • Cogwheel
        • Ellipse
        • Polygon
        • Rectangle
        • Ring
        • Star
        • Super Ellipse
      • Cel Animation Shape
      • Composition
      • Connect Shape
      • Convex Hull
      • Custom Shape
      • Duplicator
      • Editable Shape
      • Footage Shape
      • Group
      • Image to Shapes
      • Layout Shape
        • Grid Layout
        • Horizontal Layout
        • Vertical Layout
      • Outline
      • Points to Curve
      • Quad Tree Shape
      • Rectangle Pattern
      • SVG
      • Spacer
      • Sub-Mesh Bounding Box
      • Text Shape
      • Trails
    • Behaviours
      • Common Attributes (Behaviours)
      • 3D Matrix
      • Add Divisions
      • Align
      • Alpha Material Override
      • Apply Distribution
      • Apply Layout
      • Behaviour Mixer
      • Bevel
      • Blend Shape
      • Blend Sub-Mesh Positions
      • Boolean
      • Clean Up
      • Color Blend
      • Color Material Override
      • Curve to Lines
      • Distance
      • Fill Rule
      • Flare
      • Flatten Shape Layers
      • Frame
      • Get Vector
      • HSV Material Overide
      • Is Within
      • Look At
      • Manipulator
      • Material Sampler
      • Modulate
      • Morph
      • Noise
      • Number Range
      • Number Range to Color
      • Oscillator
      • Path Offset
      • Pathfinder
      • Pinch
      • Position Blend
      • Push Along Vector
      • Random
      • Resample Path
      • Round
      • Rubber Hose Limb
      • Simple Value Solver
      • Simple Value2 Solver
      • Skew
      • Sound
      • Split Path
      • Spring
      • Squetch
      • Stagger
      • Sub-Mesh
      • Subdivide
      • Swap Color Override
      • Value
      • Value 2
      • Value Blend
      • Value2 Blend
      • Visibility Sequence
      • Voxelize
    • Utilities
      • Animation Control
      • Apply Font Size
      • Array Manipulator
      • Asset Array
      • Bounding Box
      • Bounding Box Constraint
      • Color Array
      • Color Info
      • Composition Constraint
      • Component Constraint
      • Context Index
      • Falloff
      • Get Name
      • HSV Color
      • If Else
      • Index to Color
      • JS Math
      • Length Context
      • Local Time
      • Math
      • Math2
      • Math 3
      • Measure
      • Mesh Array
      • Null
      • Path Length
      • Regex
      • Rig Control
      • Sequence
      • Shader Array
      • Spreadsheet
      • Spreadsheet Lookup
      • String
      • String Array
      • String Generator
        • Formatted String Generator
        • Hash Generator
        • Hexadecimal Generator
        • Random Date Generator
        • Random Number Generator
        • Timecode Generator
        • Value Generator
      • String Length
      • String Manipulator
        • Change String Case Manipulator
        • Join String Manipulator
        • Replace String Manipulator
        • Regex String Manipulator
        • Resize String Manipulator
        • Shuffle String Manipulator
        • Sub-String Manipulator
        • Transition String Maniplulator
      • Transform Constraint
      • Typeface
      • Typeface Array
      • Value Array
      • Value 2 Array
      • Value 2 Array
      • Velocity Context
      • Velocity Magnitude Context
    • Effects
      • Blur
      • Color Shader
      • Drop Shadow
      • Fill
      • Gradient Shader
      • Image Shader
      • Invert
      • Levels
      • Linear Wipe
      • Mask Blur
      • Noise Shader
      • Radial Wipe
      • SkSL Shader
      • Shape to Shader
      • Tri Tone
      • Venetian Blinds
  • Tips
    • Shortcuts
  • Applications
    • Cavalry Player
    • Cavalry CLI
  • Technical Information
    • Licencing
    • Logs
    • Mathematical Expressions
    • Release Notes
      • 1.1.1 Release Notes
      • 1.1 Release Notes
      • 1.0.3 Release Notes
      • 1.0.2 Release Notes
      • 1.0.1 Release Notes
    • User Preferences
Powered by GitBook
On this page

Was this helpful?

  1. Nodes
  2. Utilities

Spreadsheet

Read data from a Google Sheet or .csv file.

PreviousShader ArrayNextSpreadsheet Lookup

Last updated 4 years ago

Was this helpful?

File - drag in a Google Sheet or .csv asset from the .

Column Title - select a column from your spreadsheet. The first row of your spreadsheet is reserved and used to populate this list.

A Spreadsheet node can only output data from a single column. In order to use several columns from the same .csv you need to create a Spreadsheet node for each column you want to output.

Factorize - when checked, a column of text can be converted into values. For example, a column of data containing the text Summer, Spring, Summer, Summer can be converted to a list of values 1, 0, 1, 1. The resulting list is ordered alphabetically.

For performance reasons the asset (.csv or Google Sheet) must also be 'factorized'. Right click on the asset in the and check Factorize.

Remapping - remap numerical values relative to the lowest and highest number in your data. For example, if you want to create a bar chart and need a value of 1 to be represented by a rectangle with a height of 300px, you can.

  • None - remapping disabled.

  • Number Range - see .

  • Number Range to Color - see .

If you have a minimum value of 0 and a maximum of 10 within your data and a simple black to white gradient, a value of 0 will be Black, a value of 10 will output White and a value of 5 will be remapped to 50% grey.

Fixed Row - When checked it will output the contents of the row specified in Row Index (not including the title row). Useful for .

Row Index - specify the row to output. A value of 0 outputs row 1 of your spreadsheet (row 0 is reserved for Column Title).

Row Offset - add or subtract a value to Row Index.

Use Every Nth Row - only sample the first and then every Nth row where N = the value.

Row Count - a read only attribute that outputs the number of rows in the selected column.

Example usage:

  1. Create a , a and a Spreadsheet node.

  2. Create a .csv file containing a row titled 'Name' with several names listed below.

  3. Import the .csv file to the .

  4. Drag the .csv into the File attribute of the Spreadsheet node.

  5. Set Column Title to 'Name' on the Spreadsheet node.

  6. textShape.id > duplicator.inputShapes.

  7. Set Count to X = 1 and Y = 4 on the .

  8. spreadsheet.id > textShape.text.

You should see the first 4 names from your .csv (not including the title) appear. If you have more or less than 4 names just adjust Count Y on the Duplicator.

Example usage:

  1. Create a Google Sheet containing the data below:

    Label

    Value

    Color

    Twitter

    235

    #00acee

    Instagram

    1135

    #c13584

    YouTube

    101

    #ff0000

    Vimeo

    2301

    #1ab7ea

    TikTok

    764

    #69c9d0

  2. Ensure Link Sharing is set to On and either Public on the web or Anyone with the link.

  3. Set Column Title to Value.

  4. Connect spreadsheet.id > rectangle.size.height

  5. Set Distribution to Linear.

  6. Set Count to 5.

  1. Connect align.id > rectangle.deformers.

  2. On the Align Behaviour, set Y to 1.

If the data contains small/large values then you may need to remap the values to something that produces results that better fit your Composition.

  1. Set Source Minimum to 0.

  2. Set Source Maximum to 2500. These to values roughly contain the range of your data.

  3. Set Minimum to 0.

  4. Set Maximum to 500.

A value of 0 in your data will now output as 0 while a value of 2500 will be output at 500. In this example we are effectively dividing all values by 2500/500 = 5 so a value of 1000 would be remapped to 200.

Import the Google Sheet via the .

Drag the Google Sheet asset into the (this will create a Spreadsheet Element and connect the asset).

Create a .

Select the Rectangle and alt + click the icon in the .

At this point you should have 5 rectangles each with a height set as per each row of the Value column in your data. In order to pin the rectangles to a 'floor' you can use an Behaviour.

Create an .

On the Spreadsheet Element set Remapping to .

See data.cv in for an example scene file.

Assets Window
Asses Window
Number Range
Number Range to Color
Dynamic Rendering
Text Shape
Duplicator
Assets Window
Connect
Duplicator
Connect
Assets Window
Viewport
Rectangle
Duplicator
Shelf
Align
Align
Number Range
Example Files
103KB
basebehaviours.json
Hotfix