Pasting in Data from the ClipBoard


If the Data window is visible, you can modify the contents of headers by pasting in data from Excel or other programs.

The Clipboard must contain a 1 or 2-dimensional matrix of items of the same dimensions as the data currently visible in ViewHAR. If ViewHAR is showing numerical data, it must be original, not a subtotal.

Example: Modifying elements of a 2-D matrix

In ViewHAR: bring up the whole matrix in the Data window. Set the number of decimal places to 6. Use the Export..Copy Screen to Clipboard to put the whole matrix in the Clipboard.

In Excel: paste the whole matrix into a blank sheet. Modify one or more numbers. Ensure all the numbers are displayed with appropriate precision. Select all the numbers (but not labels or row/column totals, if they are present). Copy them to the Clipboard.

Back in ViewHAR: Use the Import..Paste to Screen from Clipboard command to paste in the new numbers. You should see them changing.

To modify 3-D or higher dimensional matrices, you could paste successive slices into Excel, modify them, and paste them back. Slices of 2-D matrices or individual elements could also be modified in this way.

The rule that the dimensions of the data in the Clipboard must match the dimensions of the data displayed by ViewHAR is relaxed in the following case. If you have a 33*6 matrix in the Clipboard and ViewHAR is displaying a 6*33 matrix, ViewHAR automatically transposes the numbers when pasting.

When pasting large numbers from Excel, you may notice that some accuracy is lost. This is normal: see How accurate is ViewHAR?

Excel is not the only program that could be used to supply the clipboard data that ViewHAR pastes. GemEdit, TABmate, Word and NotePad or many other programs will also serve. You can copy cells from a Word Table, as long as the cells all contain numbers and nothing else. ViewHAR interprets the data in the clipboard as follows: each line of data corresponds to one matrix row; columns are separated by tabs.

ViewHAR allows you to paste real or integer numbers into an integer matrix! Fractional numbers are rounded automatically.

GEMPACK strings always have a maximum length. If you paste in strings longer than this, they will be truncated.

You cannot paste into matrices displayed in a special view or in transpose form or while data view is sorted.



URL of this topic: www.copsmodels.com/webhelp/viewhar/hc_paste.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage