这个够了吧。
uses comobj;
var
Excel_Handle, Book_Handle: OleVariant;
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
try
Excel_Handle := GetActiveOleObject('Excel.Application');
except
try
Excel_Handle := CreateOleObject('Excel.Application');
except
Exit;
end;
end;
Excel_Handle.Visible := True;
Book_Handle := Excel_Handle.Workbooks.Add;
Book_Handle.Sheets.Add;
for i := 1 to Book_Handle.Sheets.Count do
Book_Handle.Sheets.Name := '表' + IntToStr(i);
end;