代码如下:
var
Ole_Exl:TExcelApplication;
Ole_book:tExcelWorkbook;
Ole_sheet:tExcelWorksheet;
begin
.
.
ole_sheet1.UsedRange.Copy();//这句出错:'[' exptected but '.' found
.
.
end;
excel复制粘贴代码怎么写?100分送上
var
Ole_Exl:TExcelApplication;
Ole_book:tExcelWorkbook;
Ole_sheet:tExcelWorksheet;
begin
.
.
ole_sheet1.UsedRange.Copy();//这句出错:'[' exptected but '.' found
.
.
end;
excel复制粘贴代码怎么写?100分送上
procedure copyandPaste;
var v,sheet,range:variant;
begin
v:=createExecl;
sheet:= v.workbooks[1].sheets[1];
range:=sheet.range[sheet.cells[1,1],sheet.cells[39,30]];
range.select; //选定要复制的表格
range.copy; //复制选定的表格
sheet.range[sheet.cells[40,1],sheet.cells[40,1]].select; //选择要粘贴的位置
sheet.paste; //粘贴表格
end;