Class ClipboardProvider
ClipboardProvider is an abstract class that facilitates reading from or writing to the clipboard workbook object.
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Clipboard
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public abstract class ClipboardProvider
Constructors
ClipboardProvider()
Default constructor.
Declaration
protected ClipboardProvider()
ClipboardProvider(IWorkbook)
Creates provider for the specified workbook.
Declaration
protected ClipboardProvider(IWorkbook workbook)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | workbook | Workbook that should be copied to the clipboard. |
ClipboardProvider(IWorkbook, ClipboardProvider)
Creates provider for the specified workbook and sets the Next property to the specified value.
Declaration
protected ClipboardProvider(IWorkbook workbook, ClipboardProvider next)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | workbook | Workbook that should be copied to the clipboard. |
ClipboardProvider | next | Next clipboard provider. |
ClipboardProvider(IWorksheet)
Creates provider for the specified worksheet.
Declaration
protected ClipboardProvider(IWorksheet worksheet)
Parameters
Type | Name | Description |
---|---|---|
IWorksheet | worksheet | Worksheet that should be copied to the clipboard. |
ClipboardProvider(IWorksheet, ClipboardProvider)
Creates provider for the specified worksheet and sets the Next property to the specified value.
Declaration
protected ClipboardProvider(IWorksheet worksheet, ClipboardProvider next)
Parameters
Type | Name | Description |
---|---|---|
IWorksheet | worksheet | Worksheet that should be copied to the clipboard. |
ClipboardProvider | next | Next ClipboardProvider. |
Properties
FormatName
Gets / sets name of the clipboard format.
Declaration
public virtual string FormatName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Next
Returns next clipboard provider.
Declaration
public ClipboardProvider Next { get; set; }
Property Value
Type | Description |
---|---|
ClipboardProvider |
Workbook
Workbook that can be copied to the clipboard.
Declaration
public IWorkbook Workbook { get; set; }
Property Value
Type | Description |
---|---|
IWorkbook |
Worksheet
Worksheet that can be copied to the clipboard.
Declaration
public IWorksheet Worksheet { get; set; }
Property Value
Type | Description |
---|---|
IWorksheet |
Methods
ExtractWorkbook(IDataObject, IWorkbooks)
Extracts workbook from the data object.
Declaration
protected abstract IWorkbook ExtractWorkbook(IDataObject dataObject, IWorkbooks workbooks)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.IDataObject | dataObject | Data object that contains workbook data. |
IWorkbooks | workbooks | Workbooks collection to add workbook to. |
Returns
Type | Description |
---|---|
IWorkbook | Extracted workbook. |
FillDataObject(IDataObject)
Extracts the workbook.
Declaration
protected abstract void FillDataObject(IDataObject dataObject)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.IDataObject | dataObject | Data object to extract. |
FillDataObject(IDataObject, IRange)
Extracts the workbook.
Declaration
protected abstract void FillDataObject(IDataObject dataObject, IRange range)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.IDataObject | dataObject | Data object to extract. |
IRange | range | Range to copy into data object. |
GetBookFromClipboard(IWorkbooks)
Reads workbook from the clipboard.
Declaration
public virtual IWorkbook GetBookFromClipboard(IWorkbooks workbooks)
Parameters
Type | Name | Description |
---|---|---|
IWorkbooks | workbooks | Workbooks collection to add workbook to. |
Returns
Type | Description |
---|---|
IWorkbook | Workbook that was read if success in reading; otherwise NULL. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | When application is NULL. |
GetForClipboard()
Returns IDataObject (for copying to the clipboard) that contains data from workbook or worksheet.
Declaration
public abstract IDataObject GetForClipboard()
Returns
Type | Description |
---|---|
System.Windows.Forms.IDataObject | IDataObject for copying to the clipboard. |
GetForClipboard(IRange)
Returns IDataObject (for copying to the clipboard) that contains data from workbook or worksheet.
Declaration
public abstract IDataObject GetForClipboard(IRange range)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Range to copy to the clipboard. |
Returns
Type | Description |
---|---|
System.Windows.Forms.IDataObject | IDataObject for copying to the clipboard. |
Initialize(IWorkbook)
Initializes clipboard provider for the specified workbook.
Declaration
public virtual void Initialize(IWorkbook workbook)
Parameters
Type | Name | Description |
---|---|---|
IWorkbook | workbook | Workbook that can be copied to the clipboard. |
Initialize(IWorksheet)
Initializes clipboard provider for the specified worksheet.
Declaration
public virtual void Initialize(IWorksheet worksheet)
Parameters
Type | Name | Description |
---|---|---|
IWorksheet | worksheet | Worksheet that can be copied to the clipboard. |
SetClipboard()
Sets clipboard's data object to the value returned by GetForClipboard method.
Declaration
public virtual void SetClipboard()
SetClipboard(IRange)
Sets clipboard's data object to the value returned by GetForClipboard method.
Declaration
public virtual void SetClipboard(IRange range)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Range to copy to the clipboard. |