save_db()

save_db()

save_db(filename)

Saves the current $db and $pj variables to a file. If the filename ends with .csv, save_db() saves the data as a .csv file. Otherwise, it saves it as .opf.

Parameter

Type

Description

filename

String or Ruby object

The full path to save the Datavyu file to

Returns

Nothing.

Example

The following example saves the current spreadsheet open in the GUI to a file called test.opf that is located on the Desktop.

require 'Datavyu_API.rb'
begin
   save_db("~/Desktop/test.opf")
end