OLE control or Automation server identified by

i am getting this error while i try for Excel Automation.

Could not Create an instance of the OLE control or Automation server identified by…

what to do how to run OLE Control or Automation Server…

Which Version of Excel you are using ??

Excel 5.0 & 12.0

MS Office Excel 2007

32 or 64 bit Excel?

And which version of NAV?

Ms dynamics NAV 2009 SP1

Version IN Dynamics Nav 6.0 SP1

Ms Excel 32 Bit…

Is the error consistent? I mean do you get the error every time you try this and from every where in NAV where you can export to Excel?

Does other users get the same error when trying the same function which gives you the error?

When ever I am running,

What ever the system be.

for all users it’s coming

Can you just paste your code here ???

CLEAR(xlApplication);

CLEAR(xlRange);

CLEAR(xlWorkbooks);

CLEAR(xlWorkbook);

CLEAR(xlRange);

CLEAR(xlSheets);

CLEAR(xlWorksheet);

CLEAR(xlBorders);

IF ISCLEAR(xlApplication) THEN

CREATE(xlApplication);

xlApplication.Visible(TRUE);

xlWorkbook:=xlApplication.Workbooks;

xlWorksheet:=xlApplication.Sheets;

xlWorkbooks.Open(‘kup.xlsx’);

CLEAR(xlApplication);

CLEAR(xlRange);

CLEAR(xlWorkbooks);

CLEAR(xlWorkbook);

CLEAR(xlRange);

CLEAR(xlSheets);

CLEAR(xlWorksheet);

CLEAR(xlBorders);

IF ISCLEAR(xlApplication) THEN

CREATE(xlApplication);

xlApplication.Visible(TRUE);

xlWorkbook:=xlApplication.Workbooks;

xlWorksheet:=xlApplication.Sheets;

xlWorkbooks.Open(‘C:\Documents and Settings\sam\Desktop\sup.xlsx’);

You can write this way

IF NOT CREATE(xlApplication,TRUE) THEN

ERROR(‘Already Instantiated’);

xlWorkBook := xlApplication.Workbooks.Add;

xlWorkSheet := xlWorkBook.Worksheets.Add;

Then on Postreport

You write

xlApplication.Visible(TRUE);

Thank you Mr. Amol …

your sol… works …

Can you provide me one sample code…

to assign cell value etc.,

You can write this way

IF NOT CREATE(xlApp,TRUE) THEN

ERROR(‘Already Instantiated’);

xlWorkBook := xlApp.Workbooks.Add;

xlWorkSheet := xlWorkBook.Worksheets.Add;

xlWorkSheet.Name := ‘Item Ledger Report’;

ColNo:=1;

xlWorkSheet.Range(‘A’ + FORMAT(ColNo)).Value :=‘You field name’

ColNo+=1;

If possible kindly verify the above post if it resolve the problem so it will help other