Spread 8.0 Documentation
Copying Data
Support Options
User's Guide > Working with the Control > Working with Data > Copying Data

Glossary Item Box

Copying Data


Overview

You can copy data to and from cells using the familiar Clipboard method. Also, you can drag and drop data or use code to copy a selected block of cells. Choose the method that copies the data and formatting characteristics that you want to copy, including formatting characters and cell formatting.

The following table summarizes the ways you can copy data and the formatting characteristics that are copied with the data.

Copy method Formatting copied
ActiveX control DLL control
CopyColRange method
CopyRange method
CopyRowRange method
SSCopyRange function Formatting characters (such as monetary symbols)Cell settings (such as cell background color), and column or row settings, if using the CopyColRange or CopyRowRange methods
Drag and drop (within the same sheet) Drag and drop (within the same sheet) Formatting characters (such as monetary symbols)Cell settings (such as cell background color)
Clipboard copy Clipboard copy Data is copied exactly as it appears in the cell, including formatting characters, if they are displayed.Cell settings are not copied.

As listed in the preceding table, when you copy data from a cell or a range of cells, the settings for the cell are copied with the data, unless you are copying to the Clipboard. If you provided settings for the column or the row containing the cell, or the sheet, but not the cell itself, those settings are not copied, unless you use the CopyColRange or CopyRowRange method. For example, if you have set the source cell's background color to red, the background color is copied and the target cell will have a red background. However, if you have set the background color of the column containing the source cell to red, that setting is not copied. For more information, see Formatted and Unformatted Data and Sheet Element Selection.

When you copy data from one cell to another, the data from the cell you copied replaces the data in the cell you are pasting into. For example, if cell A1 contains the value 4 and you copy the value and paste it into cell B3, the contents of cell B3 are replaced by the value 4. Also, when you copy data from one block of cells to another, the data from the copied block replaces the values in the block you paste into.

If the copy operation copies a block of cells and then pastes it at an overlapping location, the values of all the cells of the block you are pasting to are replaced with the values of the cells in the copied block, as shown in the following figure.

Copyright © GrapeCity, inc. All rights reserved.