ITabSheet.PasteEx

Fore Syntax

PasteEx(

PasteMode: TabPasteMode;

[SkipEmptyCells: Boolean = False];

[Transpose: Boolean = False]);

Fore.NET Syntax

PasteEx[

PasteMode: Prognoz.Platform.Interop.Tab.TabPasteMode;

SkipEmptyCells: Boolean;

Transpose: Boolean];

Parameters

PasteMode. Insert mode.

SkipEmptyCells. Indicates whether empty cells are skipped.

Transpose. Indicates whether data should be transposed on insert.

Description

The PasteEx method performs special pasting.

Comments

To paste data from the clipboard to the marked table area, use the ITabSheet.Paste method.

Special paste from the clipboard is not supported if data is copied in a third-party source.

If the inserted range contains empty cells, and the SkipEmptyCells parameter is set to True, formulas, formatting and comments are not inserted for these cells.

Fore Example

To execute the example a regular report with the Regl_rep identifier is required.

Add links to the Metabase, Report and Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Sheet: IPrxTable;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Regl_rep").Edit;
    Rep := MObj As IPrxReport;
    Sheet := Rep.Sheets.Item(0As IPrxTable;
    Tab := Sheet.TabSheet;
    Tab.View.Selection.Range := Tab.Cells(0071);
    Tab.View.Selection.Copy;
    Tab.View.Selection.Range := Tab.Cell(55);
    Tab.PasteEx(TabPasteMode.Values, TrueTrue);
    MObj.Save;
End Sub UserProc;

After executing the example the regular report contains values of the A0:B7 cells that are copied and pasted into the row, starting from the E4 cell.

Fore.NET Example

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Sheet: IPrxTable;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["Regl_rep"].Edit();
    Rep := MObj As IPrxReport;
    Sheet := Rep.Sheets.Item[0As IPrxTable;
    Tab := Sheet.TabSheet;
    Tab.View.Selection.Range := Tab.Cells[0071];
    Tab.View.Selection.Copy();
    Tab.View.Selection.Range := Tab.Cell[88];
    Tab.PasteEx(TabPasteMode.tpmValues, TrueTrue);
    MObj.Save();
End Sub;

See also:

ITabSheet