DO U COME ACROSS THIS TYPE OF PROBLE

srinictsrinict Member Posts: 58
Dear Friends,
I am writing code for export my report to excel sheet. while running i am getting problem, like this.

'' This message is for c/al programmers:
An exception was raised in the method range. The OLE control or Automation server has returned error (HRESULT)-2147352567.
The component did not provide exception description.

this is coming at the code


ExcelBuf.CreateBook;
---->ExcelBuf.CreateSheet(Text007,Text007,COMPANYNAME,USERID);
ExcelBuf.GiveUserControl;
ERROR('');

Please give me some solution for this one. I have done the same coding previosly its working fine.
Thanks in advance.

Regards,
Srinivas

Comments

  • BeliasBelias Member Posts: 2,998
    try to substitute this
    ExcelBuf.CreateSheet(Text007,Text007,COMPANYNAME,USERID);
    with this
    ExcelBuf.CreateSheet('a','a','a','a');

    if you don't get the error it means one of your variables is too long.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • idiotidiot Member Posts: 651
    Another possible reason is you used illegal or reserved characters by Excel in Text007 for your worksheet name.
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
Sign In or Register to comment.