Skip to main content

Hi,

I have a python script that opens Excel files to update them with the Xlsx.Workbooks.Open command. When I run the script locally on the server with the “rundeck” account, the script works correctly.

When I run it via rundeck and pywinrm using the same user “rundeck” the Xlsx.Workbooks.Open command is in error :

error \\data\\excel\\Suivi_sav.xlsx\\xa0". Several reasons are possible\\xa0:\\n\\n• The file name or path does not exist. \\n• This file is currently used by another program.\\n• The workbook you are trying to save has the same name as a currently open workbook.", ‘xlmain11.chm’, 0, -2146827284), None).


I have the impression that when I launch via rundeck - pywinrm the user “rundeck” does not have the same rights as when I launch locally while being connected with the user “rundeck”

Do you have any idea about this problem?


THANKS.


Pat

Hi Pattrick,


Could you double-check the file path in your Rundeck job? You can test it from the Rundeck “Commands” page (and pointing to your Windows box).


Also, make sure you’ve got the right user configured in your Windows Node Definition. Same, you can verify it via the “whoami” command on the Rundeck Command page.


Regards.


Hi Reiner,


Thank you for this feedback, I rechecked the file path in the job rundeck everything is ok at this level. After several searches I found that by modifying the DCOM configuration on the server for Microsoft Excel Application at the identity level and putting the user interactive it works.


Best regards


Pat


Reply