Importing and Exporting Variable Values

You can import LIST (list), MAT (matrix), EXPR (expression), and STR (string) variables* into a spreadsheet. LIST, MAT, and EXPR type variable in spreadsheet data also can be exported.

* For information about variable types, see “Main Memory Data Types” (page 26).

uTo import the data assigned to a variable

1.In a spreadsheet, tap a single cell to specify it as the import destination of the variable data.

If the variable you are importing is an EXPR or STR type, tapping the cell will input the variable data. For a LIST or MAT type variable, data is input as shown in examples below when cell A1 is tapped.

LIST variable “{1,2,3}”MAT variable “[[1,2][3,4]]” *

1 2 * Same as 3 4

If any of the cells within the range where variable data is being input already contain data, the existing data will be overwritten with the imported data.

The data type of the cells to which data is imported will automatically change to calculation data type (LIST, MAT, EXPR) or text data type (STR) in accordance with the type of variable imported into each cell.

2.On the [File] menu, tap [Import].

This displays the Import dialog box along with a soft keyboard.

3.Type the variable name into the [Variable] box.

Tapping the 2 icon on the Import dialog box will display the Variable Manager, which you can use to select the variable you want. See “Using Variable Manager” (page 27) for more information.

4.To import the specified variable data into the spreadsheet, tap [OK].

uTo export spreadsheet data to an EXPR variable

1.Select a single cell that contains the data you want to export to an EXPR variable.

It makes no difference whether the cell you select contains a value, expression, or string. Note that string data exported from a cell is exported as EXPR type data, not STR type data.

2.On the [File] menu, tap [Export].

This displays the Export dialog box along with a soft keyboard. In this case, “EXPR” will be automatically selected in the [Type] box.

3.Type the variable name into the [Variable] box.

4.After confirming that everything is the way you want, tap [OK].

uTo export spreadsheet data to a LIST or MAT (matrix) variable

1.Select the range of cells that contains the data you want to export to a LIST or MAT variable.

2.On the [File] menu, tap [Export].

3.On the dialog box that appears, tap the [Type] box down arrow button, and then select “LIST” or “MATRIX” from the list of variable types that appears.

4.Type the variable name into the [Variable] box, and then tap [OK].

The data in the range of cells you select in step 1 is exported as shown below, in accordance with the variable type (“LIST” or “MATRIX”) you select in step 3.

Chapter 13: Spreadsheet Application

228