FarPoint.Win.Spread
ClipboardPasteOptions Enumeration
Example  See Also 
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : ClipboardPasteOptions Enumeration


Specifies what data is pasted from the Clipboard.

Syntax

Visual Basic (Declaration) 
Public Enum ClipboardPasteOptions 
   Inherits Enum
Visual Basic (Usage)Copy Code
Dim instance As ClipboardPasteOptions
C# 
public enum ClipboardPasteOptions : Enum 

Members

MemberDescription
All [0] Pastes all data objects, including values, formatting, and formulas
Values [1] Pastes only values
Formatting [2] Pastes only formatting
Formulas [3] Pastes only formulas
AsLink [4] Pastes as a link to the original cell
AsString [5] Pastes as a text string
AsStringSkipHidden [6] Pastes as a text string and skips hidden cells
Shape [7] Pastes only shape

Example

C#Copy Code
Random r = new Random();
int i, j;
DialogResult dlg;
for (i = 0; i <= 3; i++)
{
   
for (j = 0; j <= 3; j++)
   {
       fpSpread1.ActiveSheet.SetValue(i, j, r.Next() -100000);
   }
}
dlg = MessageBox.Show(
"Do you want to copy the data to the clipboard?", "ClipboardCopy", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
   fpSpread1.ActiveSheet.AddSelection(0, 0, 3, 3);
   fpSpread1.ActiveSheet.ClipboardCopy();
}
dlg = MessageBox.Show(
"Do you want to paste the data from the clipboard? If yes, let's clear the data first.", "Clear", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
   fpSpread1.ActiveSheet.Cells[0, 0, 5, 5].Text =
"";
}
dlg = MessageBox.Show(
"Now we're ready to paste!!", "ClipboardPaste", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
   fpSpread1.ActiveSheet.ClipboardPaste();
}
Visual BasicCopy Code
Dim r As New Random()
Dim i, j As Integer
Dim dlg As DialogResult
For i = 0 To 3
    For j = 0 To 3
        FpSpread1.ActiveSheet.SetValue(i, j, r.Next - 100000.ToString())
    Next j
Next i
dlg = MessageBox.Show("Do you want to copy the data to the clipboard?", "ClipboardCopy", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.AddSelection(0, 0, 3, 3)
    FpSpread1.ActiveSheet.ClipboardCopy()
End If
dlg = MessageBox.Show("Do you want to paste the data from the clipboard? If yes, let's clear the data first.", "Clear", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.Cells(0, 0, 5, 5).Text = ""
End If
dlg = MessageBox.Show("Now we're ready to paste!!", "ClipboardPaste", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
    FpSpread1.ActiveSheet.ClipboardPaste()
End If

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.ClipboardPasteOptions

See Also