Documentazione HotXLS

Copy metodo

Copies a cell o a range of cells to the specified range

Sintassi

procedura Copy(Destination: IXLSRange);
procedura Copy(Destination: IXLSRange; CopyMode: LongWord);
Destination IXLSRange. Specifica the new range to which the specified range will be copied
CopyMode Optional LongWord. The part of the range to be copied. Default is xlPasteAll

Descrizione

CopyMode can be one of these XlPasteType constants
xlPasteAll
xlPasteFormats
xlPasteValues
xlPasteColumnWidths
xlPasteNumberFormats
xlPasteValuesNumberFormats

Esempio

This example copies the range A1:D4 on Sheet1 into range E5:H8 on Sheet2

Workbook.Sheets[1].Range['A1', 'D4'].Copy(Workbook.Sheets[2].Range['E5', 'H8']);
Questo esempio copia i formati dell'intervallo A1:D4 su Sheet1 nell'intervallo E5:H8 sullo stesso foglio

With Workbook.Sheets[1] do begin
   Range['A1', 'D4'].Copy(Range['E5', 'H8'], xlPasteFormats);
end;
Questo esempio copia i valori dell'intervallo A1:D4 su Sheet1 nell'intervallo E5:H8 sullo stesso foglio

With Workbook.Sheets[1] do begin
   Range['A1', 'D4'].Copy(Range['E5', 'H8'], xlPasteValues);
end;