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?
Tino Ruijs
Microsoft Dynamics NAV specialist0
Answers
Something like "XlApp.Visible(FALSE)"
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
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 specialist
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...
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
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 specialist
Can you test by installing a nas on that client?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
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 specialist
Did you try NAS in debug-mode?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
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 specialist
Compiling the table with the right automations didn't change a thing.
And installing Excel on server1 neither.
Tino Ruijs
Microsoft Dynamics NAV specialist
On which line does it give you the error?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Is the right Excel version on the NAS-computer ?
Do you has start the NAS in debugmode?
Hey, that's a good idea!
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
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 specialist
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Thanks Eric!
It was a good holiday.
I finally got it to work.
The last thing I changed was a driveletter in a path to an UNC-path.
Now it works!
Tino Ruijs
Microsoft Dynamics NAV specialist
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
GreenSmile
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 ... ](*,)
GreenSmile