Spreadsheet
Read data from a Google Sheet or .csv file.
Last updated
Was this helpful?
Read data from a Google Sheet or .csv file.
Last updated
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 .
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:
Create a , a and a Spreadsheet node.
Create a .csv
file containing a row titled 'Name' with several names listed below.
Import the .csv
file to the .
Drag the .csv
into the File attribute of the Spreadsheet node.
Set Column Title to 'Name' on the Spreadsheet node.
textShape.id > duplicator.inputShapes.
Set Count to X = 1 and Y = 4 on the .
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:
Create a Google Sheet containing the data below:
Label
Value
Color
235
#00acee
1135
#c13584
YouTube
101
#ff0000
Vimeo
2301
#1ab7ea
TikTok
764
#69c9d0
Ensure Link Sharing is set to On and either Public on the web or Anyone with the link.
Set Column Title to Value.
Connect spreadsheet.id > rectangle.size.height
Set Distribution to Linear.
Set Count to 5.
Connect align.id > rectangle.deformers.
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.
Set Source Minimum to 0.
Set Source Maximum to 2500. These to values roughly contain the range of your data.
Set Minimum to 0.
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.