Table of Contents

TXlsFile.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 TExcelFile.InsertAndCopyRange(TXlsCellRange, Integer, Integer, Integer, TFlxInsertMode, TRangeCopyMode, TExcelFile, Integer) instead. To copy a full sheet from one file to another, use TExcelFile.InsertAndCopySheets(Integer, Integer, Integer, TExcelFile).

Syntax

Unit: FlexCel.XlsAdapter

procedure TXlsFile.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); override;

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