SpreadsheetClipboardOptions.PasteFormat Property
Gets or sets the format to use when pasting data from the clipboard onto the Spreadsheet control.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.Wpf.Spreadsheet
Declaration
Property Value
Type | Description |
---|---|
ClipboardPasteFormat | An enumeration member that specifies the clipboard format. |
Available values:
Name | Description |
---|---|
Default | The Spreadsheet detects the appropriate format to paste clipboard data. |
Biff5 | Microsoft Excel 5.0/95 binary file format (BIFF5). |
Biff8 | Microsoft Excel 97 - 2003 binary file format (BIFF8). |
Biff12 | Microsoft Excel 2007 - 2010 binary file format (BIFF12). |
Csv | Comma-delimited text. |
TabDelimited | Tab-delimited text. |
DrawingObject | A drawing object (shape or chart). |
Metafile | An image in Windows Metafile Format (WMF) or Windows Enhanced Metafile Format (EMF). |
Image | A raster image. |
ImagesFromFiles | A list of file paths to inserted images. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to PasteFormat |
---|---|
SpreadsheetControlOptions |
|
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.
<dxsps:SpreadsheetControl.Options>
<dxsps:SpreadsheetControlOptions>
<dxsps:SpreadsheetControlOptions.Clipboard>
<dxsps:SpreadsheetClipboardOptions PasteFormat="Biff12"/>
</dxsps:SpreadsheetControlOptions.Clipboard>
</dxsps:SpreadsheetControlOptions>
</dxsps:SpreadsheetControl.Options>