NAS Job Queue and create excel-file

tinoruijs
Member Posts: 1,226
Hi,
I have a codeunit that creates a Excel-document. This works fine.
I want to schedule this codeunit to run each day one time.
So I have a NAS for JOBQUEUE which also works fine, because other codeunit are executed well.
The problem with the excel-document is an error: Cannot find Excel.
Although Excel is installed on the server where the NAS is installed...
Can a NAS create a Excel-document?
I have a codeunit that creates a Excel-document. This works fine.
I want to schedule this codeunit to run each day one time.
So I have a NAS for JOBQUEUE which also works fine, because other codeunit are executed well.
The problem with the excel-document is an error: Cannot find Excel.
Although Excel is installed on the server where the NAS is installed...
Can a NAS create a Excel-document?
Tino Ruijs
Microsoft Dynamics NAV specialist
0
Answers
-
Waldo wrote:Yes, it can, but you have to be aware that it can't "show" any forms. So make sure you're creating excel without showing it. There should be an option for it.
Something like "XlApp.Visible(FALSE)"
That's the correct option indeed for not showing Excel. But I already used that.
Perhaps the problem is there's no Excel installed on the server on which NAV is installed? :-k
Excel is installed on the server on which the NAS is working. I thought that would do the trick..
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
-
Waldo wrote::-k
That should do the trick, yes.
I'm comparing with one of our installations, where we don't creates an excel, but we use excel automation (open excel, fill in parameters, read results) in a NAS.
Works without any problems...
Ok. Strange.
When I use a normal NAV client on the server where the NAS is installed, the codeunit which calls the reports is executed fine..
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
Waldo wrote:And no popup form or whatever?
Can you test by installing a nas on that client?
Only a dialog-box, but I covered that by using "If GUIALLOWED".
On that client/server the NAS is installed.
On server1 the sql-server is installed.
On server2 the NAS, a NAV-client and Excel are installed.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
Waldo wrote:Seems like a correct setup to me.
Did you try NAS in debug-mode?
Not yet.
I guess the problem could be the excel-version. Although that's 2003. Should be fine.
I'm using table 370 to generate the excel-file. When I open the globals the automations all are "Unknown Automation Server". I guess the table should be compiled with the automation available on the server where the NAS is installed.
I let you know if that is the fix.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
tinoruijs wrote:Waldo wrote:Seems like a correct setup to me.
Did you try NAS in debug-mode?
Not yet.
I guess the problem could be the excel-version. Although that's 2003. Should be fine.
I'm using table 370 to generate the excel-file. When I open the globals the automations all are "Unknown Automation Server". I guess the table should be compiled with the automation available on the server where the NAS is installed.
I let you know if that is the fix.Compiling the table with the right automations didn't change a thing.
And installing Excel on server1 neither.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
do you have restart the NAS after changing the code :?:
Is the right Excel version on the NAS-computer ?
Do you has start the NAS in debugmode?Do you make it right, it works too!0 -
I know :whistle:Do you make it right, it works too!0
-
Also login on the server as the NAS user (defined in the service), install a printer, start excel and set the correct reginal settings. This all will be saved in the windows profile.0
-
Thank you all for the reactions!
I've tried a lot of things but no succes yet..
I'm going to try it again after my vacation.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
enjoy itDo you make it right, it works too!0
-
tinoruijs wrote:The last thing I changed was a driveletter in a path to an UNC-path.
Now it works!
Hi,
can you explain me, how did you solve this problem? I have same issue too. If I run NAS as console application and export to Excel, works fine. When it is running as service, error "Aplikace Excel nebyla nalezena" (enu="Cannot find Excel.") is raised in event log. Same machine, same user, same rights... :-k_-========-_
GreenSmile0 -
greensmile wrote:tinoruijs wrote:The last thing I changed was a driveletter in a path to an UNC-path.
Now it works!
Hi,
can you explain me, how did you solve this problem? I have same issue too. If I run NAS as console application and export to Excel, works fine. When it is running as service, error "Aplikace Excel nebyla nalezena" (enu="Cannot find Excel.") is raised in event log. Same machine, same user, same rights... :-k
HEUREKA. You can't create Excel.Application instance without administrator rights when NAS run as service. After assigning admin rights, export to Excel done. My goodness ... ](*,)_-========-_
GreenSmile0
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