Error using table 370 Excel Buffer for import data

tinoruijstinoruijs Member Posts: 1,226
edited 2015-04-10 in NAV Three Tier
Hi,

I'm on NAV 2015 8.0.40262.0 (HF5).
I'm getting the following error:

Microsoft Dynamics NAV


A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookReader.Open failed with this message: C:\Data.xlsx
OK

Last month it worked fine. Perhaps an Office 365 update messed it up?

Seems it's a returning error. Saw in NAV 2013 R2 there it was bug then.

Anybody any idea how to fix it?
Or can only Microsoft deliver the solution?

Thanks in advance!

Tino Ruijs
Microsoft Dynamics NAV specialist

Comments

  • adiazramadiazram Member Posts: 6
    Hi tinoruijs

    You must give full permissions on folder where xls file is; this is because of Nav Service is with one user; RTC is with other then someway it causes NAV doesn´t find the file. It works for me \:D/

    Regards
  • tinoruijstinoruijs Member Posts: 1,226
    adiazram wrote:
    Hi tinoruijs

    You must give full permissions on folder where xls file is; this is because of Nav Service is with one user; RTC is with other then someway it causes NAV doesn´t find the file. It works for me \:D/

    Regards

    Thanks for your reply!
    Too bad the suggested solution does not work for me. :(
    I already had admin-rights. Restarted the service, but no effect.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • tinoruijstinoruijs Member Posts: 1,226
    I see hotfix 6 is out for NAV 2015.
    No mentions of the problem that I'm having, but you never know. Maybe it will be solved after upgrading to that hotfix.
    [-o<

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • tinoruijstinoruijs Member Posts: 1,226
    tinoruijs wrote:
    I see hotfix 6 is out for NAV 2015.
    No mentions of the problem that I'm having, but you never know. Maybe it will be solved after upgrading to that hotfix.
    [-o<

    Too bad. No effect.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    What is the exact scenario? Are you importing a budget from the client? Or running a piece of code that you wrote?
    In general newer versions of Windows seem to be very protective about the root directory of C:\. So do you get the same error if the file is located in e.g. C:\data\data.xlsx ?
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • tinoruijstinoruijs Member Posts: 1,226
    What is the exact scenario? Are you importing a budget from the client? Or running a piece of code that you wrote?
    In general newer versions of Windows seem to be very protective about the root directory of C:\. So do you get the same error if the file is located in e.g. C:\data\data.xlsx ?

    My fault. I've not placed the file in C:\ but in C:\Temp\. So that should not be a problem.
    I'm importing serviceorders and servicelines for invoicing.
    I'ts code I wrote and I call standard functions in table 370 (unmodified).

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • tinoruijstinoruijs Member Posts: 1,226
    This is my code:
    ExcelFunctions.ReadExcelTabTest('Blad1');
    
    ReadExcelTabTest(SheetName : Text)
    ExcelBuffer.DELETEALL;
    ExcelBuffer.OpenBook('C:\Temp\Map1.xls', SheetName);
    ExcelBuffer.ReadSheet();
    

    ExcelBuffer is table 370. Unmodified.
    Thanks!

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • BardurKnudsenBardurKnudsen Member, Microsoft Employee Posts: 137
    Just to be sure: In your example the file is named 'Map1.xls' and not Map1.xlsx. Does that mean that it is the old Excel format?
    Bardur Knudsen
    Microsoft - Dynamics NAV
  • tinoruijstinoruijs Member Posts: 1,226
    Just to be sure: In your example the file is named 'Map1.xls' and not Map1.xlsx. Does that mean that it is the old Excel format?

    It's named .xls because I thought the could be .xslm or .xslx.

    So tried it all already.
    The file I need the open and read is a .xlsm-document. And this worked fine until recently.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • tinoruijstinoruijs Member Posts: 1,226
    I also refreshed Office and I'm now on version 15.0.4701.1002.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • TomigsTomigs Member Posts: 86
    Hi,

    I don't know if you managed to fix this. I have a similar issue (NAV2015):

    I have a report that uses table 380 Excel Buffer to import Excel lines into a table.
    If I select a file that is in an "easy" folder such as "C:\TEMP\" it works fine.
    But if I select the file from the session's desktop it fails:
    "A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookReader.Open failed with this message: [filename's path] ..."

    Debugging I see that it fails when I try to select the sheet name from the file, in the table 380, function SelectSheetsName(), in the call to
    XlWrkBkReader := XlWrkBkReader.Open(FileName);

    I can see that that the path for a file in the desktop "redirected", to something like "\\SBS08\Redirected folders\Tomas\Desktop\File1.XLSX"

    I wonder if it can be a permission issue: I'm using Network Service account for the NAV service, and I wonder if maybe it has not permission to access this redirected folders. Would it make sense to change to a User account instead.


    Thanks,

    Tomigs
  • XhevatXhevat Member Posts: 9
    We have same Issue in NAV 2015. Have anyone fixed this problem ?
Sign In or Register to comment.