Error when we try to read Excel file with OpenXML variable or with Excel buffer. NAVISION 2015
Xhevat
Member Posts: 9
We have a problem to open files from users client.
When we try to open Excel file with OpenXml dotnet variable, we get an error: A call to Microsoft.Dynamics.NAV.OpenXml.Spreadsheet.WorkbookReader.Open failed with this message: "C:\Test.xlsx"
Same problem we have when we try to open text files or xml file, we get an error that file cant't open.
We have installed navision service on Server, users are connected from theirs computer to server with Roletailored client.
When we try to open Excel file with OpenXml dotnet variable, we get an error: A call to Microsoft.Dynamics.NAV.OpenXml.Spreadsheet.WorkbookReader.Open failed with this message: "C:\Test.xlsx"
Same problem we have when we try to open text files or xml file, we get an error that file cant't open.
We have installed navision service on Server, users are connected from theirs computer to server with Roletailored client.
0
Best Answer
-
Thank you RockWithNAV for your reply.
I have found the solution.
I have use UPLOAD() function to upload files from Client to Server:
https://msdn.microsoft.com/en-us/library/dd301144.aspx
5
Answers
-
Hey Xhevat,
See this link it may help you.
https://community.dynamics.com/nav/f/34/t/123879
Thanks
Blog rockwithnav.wordpress.com/
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Thank you RockWithNAV for your reply.
Link did not help me.
Same problem is for all files.
With same user if we are on server we can open file, but if we try to open file from another computer with same user, we can't open file and we get error:
For Example if we try to open text file with "MyFile.OPEN(D:\Test.txt)". We get an error: "FIle
\Test.txt was not found".
0 -
Hi Xhevat,
What you said is
With same user if we are on server we can open file, but if we try to open file from another computer with same user, we can't open file and we get error:
Whenever you are opening any file, system always checks in Client Computer like if you made a path - C:/NAV/File on Server computer and you are accessing it on the server then it will easily ind but if you will try to execute it from from different computer SAY B computer then system will try to find this path C:/NAV/File on B computer only not on the server hence it will give this error.
If you have given a browse button logic to import then you need to write a code internally which will will copy the current clients browsed file to the server computer path.
Hope this helps
Thanks https://rockwithnav.wordpress.com/
Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Hi RockWithNAV.
We are using Domain Account User.
For Example with user: "Xhevatt", if I connect with remote on server where Nav Service is installed. I can open files and no error ocurr.
But if I am connected from another computer that is on domain with user: "Xhevatt" and if I try to open files from local computer, not from server, I am getting error that file was not found.
0 -
Hey Xhevat ,
You are taking Remote Desktop Connection(RDP) of the Server computer from user Xhevatt then it's working fine. this one I understood but am so sorry still I dint understood what you meant by
But if I am connected from another computer that is on domain with user: "Xhevatt"Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Thank you RockWithNAV for your reply.
I have found the solution.
I have use UPLOAD() function to upload files from Client to Server:
https://msdn.microsoft.com/en-us/library/dd301144.aspx
5 -
Great Xhevat,
I too have faced your prob and solved the same way i mentioned, theres many .NET interop too from which you can handle this internal transmission of files. Explore Codeunit File Management (419).
Thanks
Blog -[url=" https://rockwithnav.wordpress.com/"] https://rockwithnav.wordpress.com/[/url]
Twitter - https://twitter.com/rockwithnavThanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 324 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
