מתודת Copy
מעתיק תא או טווח תאים לטווח שצוין
תחביר
procedure Copy(Destination:
IXLSRange; CopyMode: LongWord);
| Destination |
IXLSRange. מציין the new טווח to which the specified טווח will be copied |
| CopyMode |
אופציונלי LongWord. The part of the טווח to be copied. Default is xlPasteAll |
תיאור
CopyMode יכול להיות אחד מקבועי XlPasteType הבאים
| xlPasteAll |
| xlPasteAllExceptBorders |
| xlPasteColumnWidths |
| xlPasteComments |
| xlPasteFormats |
| xlPasteFormulas |
| xlPasteFormulasAndNumberFormats |
| xlPasteValues |
| xlPasteValuesAndNumberFormats |
דוגמה
דוגמה זו מעתיקה את הטווח A1:D4 ב-Sheet1 לטווח E5:H8 ב-Sheet2
Workbook.Sheets[1].Range['A1', 'D4'].Copy(Workbook.Sheets[2].Range['E5', 'H8']);
דוגמה זו מעתיקה את עיצובי הטווח A1:D4 ב-Sheet1 לטווח E5:H8 באותו גיליון
With Workbook.Sheets[1] do begin
Range['A1', 'D4'].Copy(Range['E5', 'H8'], xlPasteFormats);
end;
דוגמה זו מעתיקה את הערכים של הטווח A1:D4 ב-Sheet1 לטווח E5:H8 באותו גיליון
With Workbook.Sheets[1] do begin
Range['A1', 'D4'].Copy(Range['E5', 'H8'], xlPasteValues);
end;