'Declaration<FlagsAttribute()> Public Enum PasteOptions Inherits System.Enum
'UsageDim instance As PasteOptions
[Flags()] public enum PasteOptions : System.Enum
'Declaration<FlagsAttribute()> Public Enum PasteOptions Inherits System.Enum
'UsageDim instance As PasteOptions
[Flags()] public enum PasteOptions : System.Enum
| Member | Value | Description |
|---|---|---|
| All | 15 | Pastes all of the Cell or CellRange's content, as well as how it is formatted. |
| DataValidation | 8 | Pastes only the data validation rules found in the original Cell or CellRange. |
| Formatting | 4 | Pastes only the formatting of the original Cell or CellRange. |
| Formulas | 2 | Pastes only the formulas found in the original Cell or CellRange, without any formatting or comments. |
| None | 0 | Specifies that no mathematical operation will be applied to the pasted data. |
| Transpose | 16 | Pastes & reorients the content of the original Cell or CellRange; this means that the data in Rows will be pasted into Columns & vice versa. |
| Values | 1 | Pastes the formula results found in the original Cell or CellRange, without any formatting or comments. |
// Copies a CellRange & pastes it, keeping the original formatting the the formula results (the values) only. worksheet.Cells[ "D4", "H12" ].CopyAndPasteTo( "D47", PasteOptions.Formatting | PasteOptions.Values );
System.Object
System.ValueType
System.Enum
Xceed.Workbooks.NET.PasteOptions
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.