Error when opening Excel workbook in NAS

PieterF
Member Posts: 3
NAV2009SP1 classic.
I've created a codeunit which opens an Excel file, do some things and closes the excel file.
This is running correcty, but not when I run this codeunit from a NAS.
Just to isolate the problem i've create a new codeunit with the following code in the OnRun trigger
T370.OpenBook('\\sharename\tmp\Test.xlsx','Sheet1');
If I run this codeunit from the objectdesigner everything works fine. No forms, exceldiaglogs or windows are opened.
I've attached this codeunit to the jobqueue and started the NAS.
In the Job Queue log entry I get the following error:
[The call to member Open failed. Microsoft Excel returned the following message:
Microsoft Excel cannot access the file '\\CNU0333Q5F\tmp\Test.xlsx'. There are several possible reasons:
• The file name or path does no•
Even more strangly is that, when I start the NAS from the commandprompt the Jobqueue is executed correctly.
I'm sure that this has nothing to with userright etc. because everyting is executed with administrator rights.
The suggestions in viewtopic.php?f=23&t=38483&start=0 and viewtopic.php?f=23&t=26971&hilit=excel+NAS&start=15 does not solve the problem
Does someone has a clue how to solve this?
I've created a codeunit which opens an Excel file, do some things and closes the excel file.
This is running correcty, but not when I run this codeunit from a NAS.
Just to isolate the problem i've create a new codeunit with the following code in the OnRun trigger
T370.OpenBook('\\sharename\tmp\Test.xlsx','Sheet1');
If I run this codeunit from the objectdesigner everything works fine. No forms, exceldiaglogs or windows are opened.
I've attached this codeunit to the jobqueue and started the NAS.
In the Job Queue log entry I get the following error:
[The call to member Open failed. Microsoft Excel returned the following message:
Microsoft Excel cannot access the file '\\CNU0333Q5F\tmp\Test.xlsx'. There are several possible reasons:
• The file name or path does no•
Even more strangly is that, when I start the NAS from the commandprompt the Jobqueue is executed correctly.
I'm sure that this has nothing to with userright etc. because everyting is executed with administrator rights.
The suggestions in viewtopic.php?f=23&t=38483&start=0 and viewtopic.php?f=23&t=26971&hilit=excel+NAS&start=15 does not solve the problem
Does someone has a clue how to solve this?
0
Answers
-
0
-
I experienced this problem. It seems that when a file is created and save that the directory contents are not refreshed, so NAS cannot find the file.
What I did to overcome this problem is to create pairs of codeunits. The first of the pair creates the file. The second emails it. The 2nd of the pair can find the file.0 -
Creating a desktop folder in the window system folder did solve the problem.
Thanx for your help!0 -
you are welcome.0
-
I just ran into the issue described in this thread, but the link to the solution doesn't work anymore. Does anyone have the solution 'offline' somehow.
0 -
Found the answer to my own question.
add folder:
C:\Windows\SysWOW64\config\systemprofile\Desktop (if 64 bit)
C:\Windows\System32\config\systemprofile\Desktop (if 32 bit)
and work on the excel file from here0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K 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
- 320 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