Запускается, запускает эксель и... выкидывает ошибку "OLE Error 800A03EC"
Код: Выделить всё
...
function ReadExcel(FileName: string): Boolean;
var XLApp: Variant;
s:string;
begin
XLApp:=CreateOleObject('Excel.Application');
XLApp.Visible:=True;
try
XLApp.WorkBooks.open(filename);
except
XLApp.Quit;
ShowMessage('Cant open Excel file');
end;
s:=XLApp.sheets[1].cells[1,0].text;
XLApp.quit;
end;
..