ExcelBuffer table functions in NAV 2013

Marco_FerrariMarco_Ferrari Member Posts: 53
edited 2013-02-22 in NAV Three Tier
Hi all, I'm trying to "translate" an old code managing an export into an Excel file into the new version 2013. This is the old code:

recExcelBuffer.CreateBook;
recExcelBuffer.CreateSheet('NAV','',COMPANYNAME,USERID);
recExcelBuffer.GiveUserControl;

Those functions in NAV 2013 are different. I tried to convert it into those lines, they work, but they do not open Excel...

recExcelBuffer.CreateBook('NAV');
recExcelBuffer.WriteSheet('NAV',COMPANYNAME,USERID);
recExcelBuffer.GiveUserControl;

Does someone here had the same problem?

Thanks,
Marco
Marco Ferrari
Microsoft Certified Trainer
Cronus.it

Comments

  • MBergerMBerger Member Posts: 413
    Check the CREATE statement for your automation variables : what is the value of the "OnClient" variable ? and if you don't have a value for that at all, then that is ( probably ) your problem.
  • Marco_FerrariMarco_Ferrari Member Posts: 53
    Hi, the original procedure used the Excel Buffer table functions that in the 2013 version are completely changed. There's any CREATE function inside them... my point is to understand in which way the functions inside the Excel Buffer table can be used.

    Thanks,
    Marco
    Marco Ferrari
    Microsoft Certified Trainer
    Cronus.it
  • davmac1davmac1 Member Posts: 1,283
    The easiest way is to look at a NAV standard report that already does it like the AR Aged Receivables report (10040 in the NA edition).
    It calls the CreateBookAndOpenExcel function when the report finishes.
Sign In or Register to comment.