Dear all,
We created a powershell script in order to open/refresh/save/close an Excel file.
The script is called via the "Run command" tool in Alteryx as follows:
Powershell code:
Param ([string]$pfad_target)
$a = New-Object -ComObject "Excel.Application"
$a.Visible = $false
$a.displayAlerts = $false
$b = $a.Workbooks.Open($pfad_target) #line triggering the error
$b.RefreshAll()
$b.Save()
$b.Close()
$a.Quit()
Problem:
The workflow runs well while being executed in the local Alteryx Designer and via Remote on the Alteryx Server Designer.
However, if the workflow was uploaded to the Alteryx Gallery (Private Studio) the script shows the following misbehaviour:
Curious:
Server version:
Designer version:
Could you please advise what is going wrong here?
Thank you & best regards
Hi @badboy66,
If Server does have access to the file and you want to run as a particular user to execute the script them you could specify that on the ps1 script
Another thing to try is specify credentials of the workflow when uploading it to server
Hi, I'm facing the same issue - while trying to modify Excel file using PowerShell script. Could you please tell if you found the solution to this problem. Thank you!
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |