Я накидал ручной тип ввода:
Код: Выделить всё
var
Form1: TForm1;
Ex:Variant;
....
procedure TForm1.Excel1Click(Sender: TObject);
begin
Ex:=CreateOleObject('Excel.Application');
If vartype(Ex)=varDispatch then Ex.visible:=true;
end;
...
procedure TForm1.Excel2Click(Sender: TObject);
var
y,x:String;
begin
If vartype(ex)=varDispatch then
begin
y:=InputBox('Введите номер строки','Строка','1');
x:=InputBox('Введите номер столбца','Столбец','1');
Ex.Workbooks[1].Worksheets[1].Cells[StrToInt(y),StrToInt(x)]:=Edit2.Text;
end;
end;

