Excel Buffer | Could not find a part of the path

navuser1navuser1 Member Posts: 1,329
Dear All,

An Enduser is facing the below error message during execution of Export To Excel Report in NAV 2016.

Microsoft Dynamics NAV

A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookWriter.Create failed with this message: Could not find a part of the path
'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\Server\MicrosoftDynamicsNavServer$DynamicsNAV90\
users\default\Woods\TEMP\__TEMP__589ed7d71b1c4d29b30f4815e1a78ac2.tmp.xlsx'.
OK

All dot net variables have RunOnClient property = yes in Excel Buffer Table.

But when Users are trying to execute the export to excel report built on Excel Buffer, the generated excel file is trying to find the path in the NAV Server instead of Local Temp path.

How to solve it ?
Now or Never

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    The path suggests that it has been created on the server, not on the client.

    If your writer is declared with RunOnClient property = yes no wonder it cannot find the file.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    In Excel Buffer table most of the .NET vars should be declared with RunOnClient property = no, with the exceptions of interop vars interacting with local Excel (OpenExcel function etc)
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • navuser1navuser1 Member Posts: 1,329
    Thank you for your reply....
    Should I change the RunOnClient property YES To NO in Excel Buffer Table ?

    But Few User are able to generate the excel file without any issue. o:)
    Now or Never
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2018-02-12
    It is hard to tell without seeing all the code. The best would be to keep them as they come in Cronus I'd say, and then if you're making necessary modification decide on a case-by-case basis how they should be declared.

    The general rule is if var does not have to interact with any local resource there is no need to declare it with RunOnClient=Yes.

    Standard write to excel works by creating a temp file on the NST, writing all necessary stuff in there, closing the temp file, downloading it to the client and then opening it in Excel.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • navuser1navuser1 Member Posts: 1,329
    Even Base Report (ID 6) is also not working in the Client Sites.
    Now or Never
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    I don't think that the report 6 Trial Balance uses Excel Buffer at all.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • navuser1navuser1 Member Posts: 1,329
    I have changed the .NET variables with RunOnClient property = no in the Excel Buffer Table (As per Default Cronus Database).

    After that I have tried to execute the same report but found that no one is able to execute the export excel report (Which are built in Excel Buffer Table)
    Now or Never
  • navuser1navuser1 Member Posts: 1,329
    Report 6 Trial Balance uses Excel Buffer.
    I have checked...
    Now or Never
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Standard Report 6 in Cronus does not use Excel Buffer. If it does in your database then it must be some customization.

    I would search for errors in there (in custom code in report 6), not in the Excel Buffer table.


    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • navuser1navuser1 Member Posts: 1,329
    Again, I have checked in Cronus Database (NAV 2016 CU26 IN Version), the report id 6 is using excel buffer table to export data into excel file....

    I have checked in Default database, no doubt from my side.
    Now or Never
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Ok. I have only Cronus 2017 handy, in this one the Excel Buffer is not used in report 6
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • NavSolutionNavSolution Member Posts: 36
    In Cronus Nav 2016 R_6 use Excel Buffer.
  • navuser1navuser1 Member Posts: 1,329
    The problem has been solved.

    The problem was in the Excel Buffer Table.
    Now Every Users are able to execute as per last information received from the client Site.

    Thanks to everybody for their Time.
    Now or Never
Sign In or Register to comment.