Search Results for

    Show / Hide Table of Contents

    TExcelFile.CopyCell Method

    Copies one cell from one workbook to another. If the cell has a formula, it will be offset so it matches the new destination. Note: You will normally not need this method. To copy a range of cells from a workbook to another use InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer) instead. To copy a full sheet from one file to another, use InsertAndCopySheets(Integer, Integer, Integer, TExcelFile).

    Syntax

    Unit: FlexCel.Core

    procedure TExcelFile.CopyCell(const sourceWorkbook: TExcelFile; const sourceSheet: Integer; const destSheet: Integer; const sourceRow: Integer; const sourceCol: Integer; const destRow: Integer; const destCol: Integer; const copyMode: TRangeCopyMode); virtual; abstract;

    Parameters

    <-> Parameter Type Description
    const sourceWorkbook TExcelFile File from where we want to copy the cell.
    const sourceSheet Integer Sheet in sourceWorkbook where the data is.
    const destSheet Integer Sheet in this file where we want to copy the data.
    const sourceRow Integer Row on the source file of the cell (1 based)
    const sourceCol Integer Column on the source file of the cell (1 based)
    const destRow Integer Row on the destination file of the cell (1 based)
    const destCol Integer Column on the destination file of the cell (1 based)
    const copyMode TRangeCopyMode How the cell will be copied.

    See also

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