Moving and Copying Data
Data which have been entered once into a spreadsheet can be moved to new locations and possibly duplicated. The simplest way to do this involves dragging the selection box. A more advanced way involves a formal cut or copy operation and then a paste operation in the new location. The latter approach allows the data to be modified as they are pasted which can be extremely important.
Currently Gnumeric only supports copying, cutting and pasting of simple selections or continuous selections as described in Section 5.6 ― Selecting Cells and Cell Ranges. You cannot copy, cut or paste discontinuous selections.
It is frequently necessary to copy the results of complex calculations into a new location. This is done by selecting the data and using the Section 5.7.3 ― Paste Special below.
command from the dialog. This is explained in- 5.7.1. Simple Copy and Move
- 5.7.2. Cut, Copy and Paste
- 5.7.3. Paste Special
- 5.7.4. Cut and Paste Between Gnumeric and Other Applications
5.7.1. Simple Copy and Move
The easiest way to move or copy a cell or a group of cells is by selecting the cell or cells to be moved or copied, then using the mouse to drag the selection box to a new location.
-
Select a cell to move by clicking in it. You can also select a range of cells as described in Section 5.6 ― Selecting Cells and Cell Ranges.
-
Click Ctrl+ mouse button to copy cells.
mouse button on the border of the selection (anywhere except the autofill square in the bottom right corner). Use mouse button to move cells or -
Drag the selection to the new location.
-
Release the mouse button.
The selected cells will be copied or moved to the new location. This will move both cells' content and formatting. When copying, relative cell references in all formulas will change as described in Section 5.2.4.3 ― Cell Referencing; when moving, relative cell references will remain unchanged.
5.7.2. Cut, Copy and Paste
Another, more flexible, way to copy or move a selection is to use cut, copy, and paste operations. These operations allow the user to copy or move selected cells to the clipboard buffer and then paste the contents of the clipboard buffer to a different location or a different workbook.
- 5.7.2.1. Cutting a Selection to the Clipboard
- 5.7.2.2. Copying a Selection to the Clipboard
- 5.7.2.3. Pasting the Clipboard
5.7.2.1. Cutting a Selection to the Clipboard
To cut a cell or a selection to the clipboard, you should select a cell or range of cells as described in Section 5.6 ― Selecting Cells and Cell Ranges and then use one of the following methods:
- Use keyboard shortcut Ctrl+X.
- Choose from the menu.
-
Click on
Cut button in the toolbar.
- Right-click on the selection and choose from the context menu.
Please note that the selection will remain in its current location until you paste it. If you want to delete a selection without pasting it to a new location, use
command instead.5.7.2.2. Copying a Selection to the Clipboard
To copy a cell or a selection to the clipboard, you should select a cell or range of cells as described in Section 5.6 ― Selecting Cells and Cell Ranges and then use one of the following methods:
- Use keyboard shortcut Ctrl+C.
- Choose from the menu.
-
Click on
Copy button in the toolbar.
- Right-click on the selection and choose from the context menu.
5.7.2.3. Pasting the Clipboard
To paste the contents of the clipboard (i.e., previously cut or copied selection) to a new location, just click on a cell and use one of the following methods:
- Use keyboard shortcut Ctrl+V.
- Choose from the menu.
-
Click on
Paste button in the toolbar.
- Right-click on the cell and choose from the context menu.
If you are pasting a selection which was copied to the clipboard buffer, all relative cell references in all formulas will change as described in Section 5.2.4.3 ― Cell Referencing. The selection remains in the clipboard buffer so that it can be pasted again. The original selection will remain outlined with "marching ants" border.
If you are pasting a selection which was cut to the clipboard buffer, all cell references in all formulas will remain unchanged. The original selection will be removed from the workbook and the clipboard buffer will be cleared.
5.7.3. Paste Special
All of the methods described above to move or copy data create identical copies of the original cells in the new location. This means that both the contents and the formatting of the original selection are copied to the new location and also means that any data present in the new location are deleted. It is frequently important either to alter the data before it is pasted or to merge the data in the new location with the data being pasted. The
command enables this.The
command can act exactly like the command or may selectively paste the cell contents, the cell formats, the calculated values of the original cells rather than their contents. described in the previous section copies both contents and formatting of the original selection. If you need more options, use command.The
command can be accessed, after a selection has been cut or copied as explained above, in one of two ways. First, the location where the pasting should happen must be selected. The easiest way to do this is to select the single cell which will be at the top left hand corner of the region of pasted cells. Alternatively, the exact region into which the cells will be copied can be selected. After the selection is made, the command can be chosen from the menu or the context menu obtained by clicking with the right mouse button in the cell area of the spreadsheet.The
menu item opens a dialog with three categories. By default, acts as if it were the menu item.The first set of choices allow the user to control the data pasted.The user can choose to limit the pasting to only the cell contents (no cell formatting is copied) or the opposite only cell formats copied (no contents). Furthermore, the user can insert the selection while transforming all the contents into values only. Formulas will be replaced by their values.
A second set of choices allows the user to perform simple mathematical operations during the paste. These operations use the current contents of the cells in the paste range and the contents of the clipboard. For example, if you are pasting a cell containing number 5 to a cell that currently contains number 10 and choose option Divide, the result will be 10/5=2. Choosing option None will just replace the previous contents of the cells by the contents of the clipboard buffer (this is the default behavior).
The final choices contains the following options:
- Transpose. This option will transpose the selection, i.e. interchange the rows and columns. Thus, a range with k rows and n columns will become a range with n rows and k columns, so that the firs row becomes the first column, and so on.
- Skip Blanks. This option prevents Gnumeric from taking any action for the cells in the selection that are blank. For such cells, the existing contents of the cells in the paste range will be kept.
5.7.4. Cut and Paste Between Gnumeric and Other Applications
Cut and paste commands described above allow copying and moving selections from one location in a spreadsheet to another, or between different spreadsheets. However, you can also use cut and paste to exchange information between Gnumeric and other applications, using so-called X clipboard which is shared by all graphical applications.
Whenever you cut or copy a selection in Gnumeric, it is placed both in Gnumeric clipboard and in X clipboard. In X clipboard, it is placed as text, with formulas replaced by their values and contents of different cells separated by spaces.
To paste the selection from X clipboard to an application, click with middle mouse button (if you have two button mouse, you can emulate the middle mouse button by pressing left and right buttons simultaneously). Most applications also allow pasting from X clipboard by using keyboard shortcut (usually Ctrl+V) or by choosing .
To paste a selection from another application to Gnumeric, place this selection in the X clipboard. Usually it is done by just selecting it with the mouse; some applications also allow you to use keyboard shortcut Ctrl+C, or choose . After this, you can paste it in Gnumeric by using command described above. This command will automatically paste the contents of X clipboard if Gnumeric's own clipboard is empty.
Pasting X clipboard in Gnumeric will automatically launch the Text Import druid which will assist you in importing the plain text contents of X clipboard into the spreadsheet. The Text Import druid is described in Section 14.4 ― Importing Text Files.