transfer_columns()¶
- transfer_columns(db1, db2, remove, *varnames)¶
Transfers columns between spreadsheets. Replacing
db1
ordb2
with the empty string “”, will refer instead to the currently open spreadsheet in Datavyu.Thus, if you want to transfer a column into the GUI, set
db2
to ‘’, and specify the origin spreadsheet file asdb1
. If you want to transfer a column from the GUI into a file, setdb1
to ‘’, and setdb2
to that file’s path.Warning
Setting
remove
toTRUE
will DELETE THE COLUMNS YOU ARE TRANSFERRING FROM DB1.Parameter
Type
Description
db1
String
The full path to save the first Datavyu file. Set to ‘’ to use the spreadsheet that’s currently open.
db2
String
The full path to save the second Datavyu file. Set to ‘’ to use the spreadsheet that’s currently open.
remove
Boolean
If
TRUE
, Datavyu will delete the columns fromdb1
as they are copied todb2
.FALSE
leaves the columns intact.varnames
list of strings
List of the names of the columns that you wish to copy from
db1
todb1
. You must specify at least one column name.Returns
Nothing. Saves files in place or modifies the GUI.
Example
The following example transfers the column “idchange” from test.opf to the GUI and leaves test.opf intact and unmodified.
require 'Datavyu_API.rb' begin sourceFile='/Users/datavyutester/Desktop/FileName1.opf' destinationFile='/Users/datavyutester/Desktop/FileName2.opf' columnsToTransfer = ['trial_rel', 'condition_rel'] transferMyVariable(sourceFile, destinationFile, false, columnsToTransfer) end