Open Forum

  • 1.  Excel Buffer error

    Posted Sep 24, 2020 02:02 PM
    Hi all,

    I'm trying to work with the Excel Buffer table, but I've run into an error that I can't seem to figure out what to do about it.  Below is the code and the error.  I've gone through this in the debugger and it looks like it's failing in the GetCellDecorator function from within the Excel Buffer table.  The only thing I can find on the Googles that seems like remotely useful information is this article, but since the error's coming out of a base table, it doesn't seem like something I should start messing with.  I also saw that uninstalling/reinstalling the Open XML SDK 2.5 fixed some issues sometimes, but it has not helped in this instance.  Any ideas on what I might be missing here?

    Also, I'm running Nav 2018 with db/RTC/client on my local system (although, it also doesn't work when running this same code from our dev environment).

    ExcelBuffer.NewRow; ExcelBuffer.AddColumn('Test',FALSE,'',FALSE,FALSE,FALSE,'',ExcelBuffer."Cell Type"::Text); ExcelBuffer.CreateBookAndOpenExcel('c:\users\kisersj\desktop\test.xlsx','Test','',COMPANYNAME,USERID);​


    Microsoft Dynamics NAV
    ---------------------------

    Cannot serialize an instance of the following .NET Framework object: assembly Microsoft.Dynamics.Nav.OpenXml, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, type Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.CellDecorator.
    ---------------------------
    OK
    ---------------------------


    Thanks for any help!

    ------------------------------
    Steve Kaser
    Process Analyst
    NK Parts Industries Inc
    Sidney OH
    ------------------------------
    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role