|
can!
lead:
Excel can be controlled using Automation technology. Such as:
var MyExcel, MyWorkbook: Variant;
procedure TForm1.Button1Click (Sender: TObject);
begin
MyExcel: = CreateOleObject ('Excel.Application');
MyExcel.Visible: = true;
MyWorkbook: = MyExcel.Workbooks.Open ('e:\book1.xls');
MyExcel.ActiveCell.FormulaR1C1: = 'ssssssss';
end;
If you do n’t know the command in Excel, you can use Excel's “Record Macro” function to record an operation, and then use the method of editing the macro to see what the VBA command corresponding to this operation is. |
|