All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

SpreadsheetClipboardOptions.PasteFormat Property

Gets or sets the format to use when pasting data from the clipboard onto the Spreadsheet control.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

[DefaultValue(ClipboardPasteFormat.Default)]
public ClipboardPasteFormat PasteFormat { get; set; }
<DefaultValue(ClipboardPasteFormat.Default)>
Public Property PasteFormat As ClipboardPasteFormat
[DefaultValue(ClipboardPasteFormat.Default)]
public ClipboardPasteFormat PasteFormat { get; set; }
<DefaultValue(ClipboardPasteFormat.Default)>
Public Property PasteFormat As ClipboardPasteFormat
[DefaultValue(ClipboardPasteFormat.Default)]
public ClipboardPasteFormat PasteFormat { get; set; }
<DefaultValue(ClipboardPasteFormat.Default)>
Public Property PasteFormat As ClipboardPasteFormat

Property Value

Type Default Description
ClipboardPasteFormat

Default

An enumeration member that specifies the clipboard format.

Property Value

Type Default Description
ClipboardPasteFormat

Default

An enumeration member that specifies the clipboard format.

Property Value

Type Default Description
ClipboardPasteFormat

Default

An enumeration member that specifies the clipboard format.

Remarks

When the PasteFormat property is set to Default, the Spreadsheet control inserts data from the clipboard in the most appropriate format. When selecting the clipboard format to use, the Spreadsheet checks each format from the ClipboardPasteFormat enumeration to determine if the clipboard currently contains data in this format. If a matching format is found, the Spreadsheet stops the check and uses this format to retrieve data. Below is the order in which the Spreadsheet goes through its list of supported formats:

  • ClipboardPasteFormat.Biff8
  • ClipboardPasteFormat.Biff12
  • ClipboardPasteFormat.Biff5
  • ClipboardPasteFormat.Csv
  • ClipboardPasteFormat.TabDelimited
  • ClipboardPasteFormat.DrawingObject
  • ClipboardPasteFormat.Metafile
  • ClipboardPasteFormat.Image
  • ClipboardPasteFormat.ImagesFromFiles

Use the PasteFormat property to explicitly specify the clipboard format the Spreadsheet control should use to insert data. For example, if you want to paste strings longer than 255 characters from the clipboard, you should set the PasteFormat property to Biff12. Otherwise, the Spreadsheet control uses Biff8 (XLS) format to retrieve data and the inserted strings get truncated to 255 characters.

spreadsheetControl1.Options.Clipboard.PasteFormat = DevExpress.XtraSpreadsheet.ClipboardPasteFormat.Biff12;
See Also