Table (vuo.table)

Nodes for working with information that has a tabular structure made up of rows and columns, like a spreadsheet.

You can import a spreadsheet into a Vuo composition by exporting it from your spreadsheet application in CSV (Comma-Separated Values) or TSV (Tab-Separated Values) format and using the Fetch Data and Make Table from Text nodes. You can export CSV or TSV data from a Vuo composition, to be imported into your spreadsheet application, by using the Format Table and Save Data nodes.

Like a spreadsheet, Vuo’s Table data type stores information in a grid of rows and columns. For example, here’s a table of top-ranking tennis players (source: http://www.wtatennis.com/rankings):

RankPlayerCountryPoints
1Serena WilliamsUnited States7010
2Angelique KerberGermany6925
3Karolina PliskovaCzech Republic6020
4Dominika CibulkovaSlovak Republic5065
5Simona HalepRomania5021

This table has 6 rows and 4 columns. In several nodes, such as Get Table Row and Get Table Column, you can refer to rows and columns by number, counting left-to-right or top-to-bottom starting from 1. For example, the header row of this table is row 1, and the bottom row (Simona Halep) is row 6.

You can also refer to rows and columns by header if there is one. The table above has headers for the columns (but not for the rows). With the Get Table Column node, you could request the row with header Player to get a list of all of the players' names.

To switch between these two modes of referring to rows/columns — numbers or headers — change the data type of the Row/Column port. (Right-click on the port and select Integer or Text from the Set Data Type submenu.)

Vuo stores each item of the table as text (even if it’s a number or date). With the Sort Table node, you have the option to treat the sorted column as a number or date, instead of sorting it alphabetically like text. When you retrieve table items with the Get Table Row, Get Table Column, or Get Table Item node, the items are output as text. You can convert them to numbers using nodes such as Convert Text to Integer and Convert Text List to Real List.

CSV field separators

Depending on your system’s region settings, Microsoft Excel may export CSV files that actually use semicolon as the field separator. Vuo attempts to automatically determine whether each CSV file uses commas or semicolons.

If Vuo detects the field separator incorrectly, or if you’d like to read a file using a separator other than comma, semicolon, or tab, you can open your CSV file in a text editor and add a line like this at the very beginning:

sep=C

…where C is the character to use as the field separator. You can then read the file using Fetch Data or Make Table from Text with the Format field set to CSV.

When Format Table outputs CSV data, it always uses comma as the field separator.



Example compositions:



Nodes: