Paste Special Dialog

  • 2 minutes to read

The Paste Special dialog allows end-users to specify additional paste options after cutting or copying data to the Clipboard.

DXSpreadsheet_Dialogs_PasteSpecial

An end-user can specify the format of the pasted data using one of the following options available in the Paste Special dialog:

Option Description
All Pastes all cell content and formatting.
Formulas Pastes formulas as entered in the Formula Bar. Note that the relative cell references within the formula will be adjusted automatically to reflect the new location.
Values Pastes cell values only (including the formula results, but not the formulas themselves).
Formats Pastes cell formatting only.
Comments Pastes only the comments added to cells.
All except borders Pastes cell content and formatting without cell borders.
Column widths Applies the column widths of the copied cells to another range of columns.
Formulas and number formats Pastes only the formulas and number formatting options from the copied cells.
Values and number formats Pastes only the values and number formatting options from the copied cells.
Skip blanks Pastes the values of all cells except for empty cells.

To provide end-users with the capability to invoke the Paste Special dialog, add the Clipboard ribbon group to the SpreadsheetControl. For an example on how to create a spreadsheet application with the ribbon UI, refer to the Lesson 1 - Create a Simple Spreadsheet tutorial.

DXSpreadsheet_Dialogs_PasteSpecial_Button

To programmatically specify the part of the data to be pasted in the target cells, use the CellRange.CopyFrom method, which accepts a value of the PasteSpecial enumeration as a parameter. For details, refer to the How to: Copy Cell Data Only, Cell Style Only, or Cell Data with Style and How to: Copy a Row or Column examples.