DanielManchester
asked on
Automation problem with Delphi 2010 and Excel 2013
I have been using TExcelApplication component in Delphi to create a new Excel document and save it to file using automation. It has been working fine until I tried it will Excel 2013 and when I call
TExcelApplication.Save(sFi le); I get the following error OLE Error 800A03EC
Here is my code:
try
ExcelApplication.Connect;
except on E: Exception do
begin
E.Message := 'Excel unavailable.';
raise;
end;
end;
lcid := GetUserDefaultLCID;
ExcelApplication.Visible [0] := true;
ExcelApplication.Caption := 'Chronicle Document';
excelapplication.workbooks .Add(Empty Param, 0);
ExcelApplication.DisplayAl erts[lcid] := False;
ExcelApplication.activewor kbook.Save As(sFile, EmptyParam, EmptyParam,
EmptyParam, EmptyParam, EmptyParam,
xlNoChange, EmptyParam, EmptyParam,
EmptyParam, EmptyParam, lcid);
I add some data to the work book and then call TExcelApplication.Save(sFi le);
Thanks for you help
Daniel
TExcelApplication.Save(sFi
Here is my code:
try
ExcelApplication.Connect;
except on E: Exception do
begin
E.Message := 'Excel unavailable.';
raise;
end;
end;
lcid := GetUserDefaultLCID;
ExcelApplication.Visible [0] := true;
ExcelApplication.Caption := 'Chronicle Document';
excelapplication.workbooks
ExcelApplication.DisplayAl
ExcelApplication.activewor
EmptyParam, EmptyParam, EmptyParam,
xlNoChange, EmptyParam, EmptyParam,
EmptyParam, EmptyParam, lcid);
I add some data to the work book and then call TExcelApplication.Save(sFi
Thanks for you help
Daniel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.