CreateBook in Excel Buffer Fails only for NAS user

victor73victor73 Member Posts: 55
Hello to everybody,

I don't know if anyone has ever experienced what I am supposed to describe, but in case so, please come back with your suggestions because it is really driving me insane:

Case Scenario: send an excel sheet attached to an email automatically to our internal compliance Team

if the process is executed manually via job scheduler the excel sheet is correctly created, attached and sent to our team via Smtp.
if the same exact process is triggered via NAS (by the way at the moment we have different processes that are working by NAS - Job Scheduler - so there are no problems!) the process breaks exactly in Table 370 in function CreateBook() when the IF NOT CREATE(XlApp,TRUE,TRUE) THEN Error (Text000) where Text000 = Excel not Found.

I have tried to look for any resolution, found that the following folder had to be created C:\Windows\SysWOW64\config\systemprofile\Desktop but nothing

Found that the NAS Windows user must have admin rights, done that too, but nothing.

Is there anybody around who has encountered this issue?
If so, can you please share your thoughts about it?

Thanks to you all!
:lol:

Comments

  • victor73victor73 Member Posts: 55
    Hi NAV guys,
    has anybody got a clue about my issue?
    It is a really urgent matter
    Please shout in case so
    Regards
  • victor73victor73 Member Posts: 55
    Hi all again,
    since there hasn't been any response to my topic, I deduce that it is not solvable?!
    Or that nobody has any suggestions to give
    Thanks
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I have said it over and over again: automation with Microsoft Office is not meant to be executed by an Application Server. It's not supported. If it works you are very lucky. If it don't works you have bad luck. Try using some alternative.

    This topic provides an alternative btw: Excel Buffer + NAS in NAV2013?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    Make sure that the NAS service is stopped.
    Make sure that no other services runs with the credentials of the NAS user on the box.
    Log in on the same box on which the NAS is installed. Use the same credentials as the NAS service.
    Test your functionality manually in the fin(sql).exe client.
    Test your functionality from the job queue running a nas(sql).exe from a dos-prompt.

    It SHOULD Work!
  • victor73victor73 Member Posts: 55
    Hi all,
    thanks for your feedback I was afraid about the fact automation wasn't supported by NAS, but I was trying to discover if there was an alternative. In one of your feedbacks you mentioned to look at
    http://www.mibuso.com/forum/viewtopic.php?f=32&t=58847
    but I don't understand where is the alternative given in such topic?

    Then let's talk about the other response:
    what do you exactly mean by "Test your functionality from the job queue running a nas(sql).exe from a dos-prompt"?
    Thanks, I really appreciate your opinions!
  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    First lets "talk" about the first four steps in my previous response...
    Did it work when you reached the fourth step? Otherwise there's no point in going to step 5!
  • victor73victor73 Member Posts: 55
    Hi yes it did
    :o thanks
  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    Great, now you go to step no. 5...

    Start a dos prompt and navigate to the NAS directory. Usually C:\Program Files (x86)\Microsoft Dynamics NAV\60\Application Server\
    Here you start the application server manually:
    NAS.exe servername=localhost, company="YourCompanyName", startupparameter="JOBQUEUE"
    

    (If using SQL you must use nassql.exe and include the database parameter)

    And of course you must make sure that the only active job in the Job Queue is your Excel job.

    Does it work?
  • victor73victor73 Member Posts: 55
    Hi all,

    thanks for your support, but I changed the strategy and exported the file in txt Tab delimited. I did this because the report had to be delivered quickly and since I was having too much trouble I abandoned excel export with NAS since excel automation is not supported.

    By the way, I still don't understand your suggestion: I don't want to manually execute the job scheduler by using DOS?
    Can you tell me why you are suggesting it to me?
    Is there some reason that I am unaware of?

    Thanks a lot folks
    :D
  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    I know that Excel works from NAS (done this a thousand times)!
    That's why I gave you 5 simple steps to go through to test it and make it work.

    If you're a sissy and don't wan't to go all the way - then you're on your own :wink:
Sign In or Register to comment.