Search Results for

    Show / Hide Table of Contents

    TExcelFile.InsertAndCopyRange Method

    Overloads

    • TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode)
    • TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode)
    • TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer)
    • TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer, TExcelObjectList)

    TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode)

    Inserts and/or copies a range of cells from one place to another.

    This method is one of the most important on FlexCel API, and it allows you to copy ranges of cells from one place to another, adapting the formulas, images and everything as Excel would do it.

    Remarks

    This overload is useful for inserting and copying in the same sheet.

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.InsertAndCopyRange(const sourceRange: TXlsCellRange; const destRow: Integer; const destCol: Integer; const destCount: Integer; const insertMode: TFlxInsertMode); overload;

    Parameters

    <-> Parameter Type Description
    const sourceRange TXlsCellRange The range of cells you want to copy. If you specify full rows, they will be copied with Row format information and size. If you copy just a part of a row, Row format will not be copied.
    The same applies to columns. The only way to copy all row and columns, is to specify the full (A:IV) range.
    const destRow Integer Destination row where the cells will be copied.
    const destCol Integer Destination column where the cells will be copied.
    const destCount Integer Number of times the sourceRange will be copied at (desRow, destCol).
    If you make for example destCount=2, sourceRange will be copied 2 times at (destRow, destCol)
    const insertMode TFlxInsertMode How the cells on destination will be inserted. They can shift down or left.
    Specifying Row or Col as mode is equivalent to specify a sourceRange including full rows or columns respectively.

    See also

    • TExcelFile

    TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode)

    Inserts and/or copies a range of cells from one place to another.

    This method is one of the most important on FlexCel API, and it allows you to copy ranges of cells from one place to another, adapting the formulas, images and everything as Excel would do it.

    Remarks

    This overload version is useful for inserting only and not copying.

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.InsertAndCopyRange(const sourceRange: TXlsCellRange; const destRow: Integer; const destCol: Integer; const destCount: Integer; const insertMode: TFlxInsertMode; const copyMode: TRangeCopyMode); overload;

    Parameters

    <-> Parameter Type Description
    const sourceRange TXlsCellRange The range of cells you want to copy. If you specify full rows, they will be copied with Row format information and size. If you copy just a part of a row, Row format will not be copied.
    The same applies to columns. The only way to copy all row and columns, is to specify the full (A:IV) range.
    const destRow Integer Destination row where the cells will be copied.
    const destCol Integer Destination column where the cells will be copied.
    const destCount Integer Number of times the sourceRange will be copied at (desRow, destCol).
    If you make for example destCount=2, sourceRange will be copied 2 times at (destRow, destCol)
    const insertMode TFlxInsertMode How the cells on destination will be inserted. They can shift down or left.
    Specifying Row or Col as mode is equivalent to specify a sourceRange including full rows or columns respectively.
    const copyMode TRangeCopyMode Which cells on sourceRange will be copied. If you intend to replace values on the copied cells, you might specify OnlyFormulas. If you just want to insert cells and not copy, specify None.

    See also

    • TExcelFile

    TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer)

    Inserts and/or copies a range of cells from one place to another.

    This method is one of the most important on FlexCel API, and it allows you to copy ranges of cells from one place to another, adapting the formulas, images and everything as Excel would do it.

    Remarks

    This overload is useful for copying from another file. It is not as fast or complete as the other overloaded versions because it has to do a lot of transforms on the data. But it is very useful anyway.

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.InsertAndCopyRange(const sourceRange: TXlsCellRange; const destRow: Integer; const destCol: Integer; const destCount: Integer; const insertMode: TFlxInsertMode; const copyMode: TRangeCopyMode; const sourceWorkbook: TExcelFile; const sourceSheet: Integer); overload;

    Parameters

    <-> Parameter Type Description
    const sourceRange TXlsCellRange The range of cells you want to copy. If you specify full rows, they will be copied with Row format information and size. If you copy just a part of a row, Row format will not be copied.
    The same applies to columns. The only way to copy all row and columns, is to specify the full (A:IV) range.
    const destRow Integer Destination row where the cells will be copied.
    const destCol Integer Destination column where the cells will be copied.
    const destCount Integer Number of times the sourceRange will be copied at (desRow, destCol).
    If you make for example destCount=2, sourceRange will be copied 2 times at (destRow, destCol)
    const insertMode TFlxInsertMode How the cells on destination will be inserted. They can shift down or left.
    Specifying Row or Col as mode is equivalent to specify a sourceRange including full rows or columns respectively.
    const copyMode TRangeCopyMode Which cells on sourceRange will be copied. If you intend to replace values on the copied cells, you might specify OnlyFormulas. If you just want to insert cells and not copy, specify None.
    const sourceWorkbook TExcelFile Workbook from where we are copying the cells. This might be the same workbook, and you would by copying from another sheet.
    const sourceSheet Integer Sheet index on the source workbook. If sourceWorkbook is the same instance as this, and sourceSheet is the active sheet on the instance, this method is equivalent to the simpler overloaded version.

    See also

    • TExcelFile

    TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer, TExcelObjectList)

    Inserts and/or copies a range of cells from one place to another.

    This method is one of the most important on FlexCel API, and it allows you to copy ranges of cells from one place to another, adapting the formulas, images and everything as Excel would do it.

    Remarks

    This overload is useful for copying from another file. It is not as fast or complete as the other overloaded versions because it has to do a lot of transforms on the data. But it is very useful anyway.

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.InsertAndCopyRange(const sourceRange: TXlsCellRange; const destRow: Integer; const destCol: Integer; const destCount: Integer; const insertMode: TFlxInsertMode; const copyMode: TRangeCopyMode; const sourceWorkbook: TExcelFile; const sourceSheet: Integer; const ObjectsInRange: TExcelObjectList); overload; virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sourceRange TXlsCellRange The range of cells you want to copy. If you specify full rows, they will be copied with Row format information and size. If you copy just a part of a row, Row format will not be copied.
    The same applies to columns. The only way to copy all row and columns, is to specify the full (A:IV) range.
    const destRow Integer Destination row where the cells will be copied.
    const destCol Integer Destination column where the cells will be copied.
    const destCount Integer Number of times the sourceRange will be copied at (desRow, destCol).
    If you make for example destCount=2, sourceRange will be copied 2 times at (destRow, destCol)
    const insertMode TFlxInsertMode How the cells on destination will be inserted. They can shift down or left.
    Specifying Row or Col as mode is equivalent to specify a sourceRange including full rows or columns respectively.
    const copyMode TRangeCopyMode Which cells on sourceRange will be copied. If you intend to replace values on the copied cells, you might specify OnlyFormulas. If you just want to insert cells and not copy, specify None.
    const sourceWorkbook TExcelFile Workbook from where we are copying the cells. This might be the same workbook, and you would by copying from another sheet.
    const sourceSheet Integer Sheet index on the source workbook. If sourceWorkbook is the same instance as this, and sourceSheet is the active sheet on the instance, this method is equivalent to the simpler overloaded version.
    const ObjectsInRange TExcelObjectList Returns the objects that are in the range to be copied. This is an optimization so you don't have to find those objects again. Set it to null to not return any objects

    See also

    • TExcelFile
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.8.0
    © 2002 - 2020 tmssoftware.com