Array Viewer is a part of McCal Viewer, specifically designed for displaying one- or two-dimentional array data in a spreadsheet-like interface. You can view and edit the elements of an array. Furthermore, users can copy and paste data beween McCal Array Viewer and Microsoft Excel® files.
To open a spreadsheet file, and copy/paste data, one of the following 'Office' programs can be utilized.
Unfortunately, the programs below seem not to support 'copy-and-paste'.
McCal-lite does not support ArrayViewer.
Tap on the array-type variable in McCal Viewer. A dialog for managing the variable appears (shown below). Pressing the "ArrayViewer" button starts up ArrayViewer.
To move the view, touch and drag any part of the grid-like sheet. Matrix Viewer also supports "fling" and "pinch" gesture. The width of the columns are changed by "pinch".
Double tap on the cell of which value you wan to change, and its background color will turn red. Now, you can change the value of the selected element.
Enter an expression, such as "123" and "a[1][0]+1", in the text window at the top of the screen, and press the
button.To un-select the cell, double tap on the selected cell.
You can select a rectangular region of a sheet, and copy/paste it between McCal and spreadsheet files. To select a rectangular region, long-press the cell at the top-left corner of the rectangle (in the case below, soccer[2][0] cell). The background color turns blue. Without releasing your finger, drag diagonally to the corresponding cell at the opposite corner (soccer[3][1]).
Alternatively, you can select one line (horizontally or vertically in the 2D array) as a region. Just touch the corresponding label in the horizontal or vertical label-view.
Now it's ready to copy the region to the clipboard.
In the current implementation of Array Viewer, copying/pasting a rectangular region of a 2D array to a spreadsheet file is supported using Google's QuickOffice® app, or one of the other programs listed in the beginning.
To copy the selected region, choose "Copy" in the option menu, then the data are sent to the Android clipboard. In an Office program, you can paste the data to a spreadsheet. Please note that, since Office programs do not understand complex numbers, complex numbers will be converted to strings.
To copy data from an Office program, first select/copy the data of your interest in the program. Go back to McCal Array Viewer, and double-tap on the cell at the top-left corner of the region you are going to copy (selecting a cell). The background color of the cell turns red. Then choose "Paste" in the option menu.
Note that any previous data in the destination region will be lost by over-writing. You can undo pasting only once by selecting "Undo" in the option menu.
When the copied region extends to the outside of the 2D array, the size of the array is expanded automatically.
It is possible to 'copy-and-paste' data within McCal Viewer. Floating point numbers and complex numbers will be copied without any rounding errors.
After selecting and copying a region, ppress the upper-left arrow of the ActionBar, then McCal Viewer returns to the variable list. Now, open the destination variable in ArrayViewer. Select the cell for the destination region, and "paste" using the option menu.
Unlike other spreadsheet programs, you cannot delete a rectangular region in McCal Matrix Viewer. It is, though, possible to delete a line (column or row). After selecting a horizontal or vertical line, choose "Delete" in the option menu.
You can change the size of the 2D array by choosing "Expand" in the option menu. One line of "zero-filled" cells will appear at each side of the array (top, left, bottom, and right). Delete unnecessary lines later.
Android Office programs seem to use a non-standard format for the Android clipboard. Although we tried our best to support the format, we cannot guarantee the correctness of data conversion.
The following figure illustrates how users go to, and come back from, the sub-activities of the McCal system.