天
天堂鸟6420
Unregistered / Unconfirmed
GUEST, unregistred user!
请问如何将这个宏用Delphi语句写出,主要是第二句,因为行数不固定,需要动态宏
Sub 宏1()
Range("C11").Select
Selection.AutoFill Destination:=Range("C117"), Type:=xlFillDefault
Range("C117").Select
End Sub
//delphi程序
uses ComObj;
procedure Test;
var
Excel: variant;
begin
Excel := CreateExcelApp('统计表.xlt');
EXCEL.ActiveSheet.Range['C1','D1'].Select;
//这个第二句怎么写啊
// EXCEL.Selection.AutoFill.Destination := EXCEL.ActiveSheet.Range['BM5','BN' + inttostr(beginRow + Ir)];
// EXCEL.ActiveSheet.Selection.AutoFill.Type := xlFillDefault;
EXCEL.ActiveSheet.Range['C1','D17'].Select;
Excel.Visible := True;
end;
Sub 宏1()
Range("C11").Select
Selection.AutoFill Destination:=Range("C117"), Type:=xlFillDefault
Range("C117").Select
End Sub
//delphi程序
uses ComObj;
procedure Test;
var
Excel: variant;
begin
Excel := CreateExcelApp('统计表.xlt');
EXCEL.ActiveSheet.Range['C1','D1'].Select;
//这个第二句怎么写啊
// EXCEL.Selection.AutoFill.Destination := EXCEL.ActiveSheet.Range['BM5','BN' + inttostr(beginRow + Ir)];
// EXCEL.ActiveSheet.Selection.AutoFill.Type := xlFillDefault;
EXCEL.ActiveSheet.Range['C1','D17'].Select;
Excel.Visible := True;
end;