Hello,
I've got Visual Cron installed on a Windows Server (2016 build 1607). Also installed on that server is Excel (version 2502 build 18526.20144). I have an Excel file that is connected to a SharePoint site to pull in data from a file. When I open Excel on the server, logged in as the service account that runs visual cron, the Excel file will pull in the latest data from SharePoint. I have created a PowerShell script that will open up the Excel file, pull in the latest data, and save the results to a CSV file. When I run this PowerShell script as the Visual Cron service account everything works fine. However, if I try to run the PowerShell script from Visual Cron, via a PowerShell task things don't quite work. The task succeeds and the CSV file is created, but the latest SharePoint data is not pulled into the Excel file. The Excel file is setup to refresh data sources upon opening, and the PowerShell script has an explicit refresh all data connections.
I've tried wrapping the PowerShell script in a batch script and when I run the batch script if I'm logged in as the service account and change the Execution context to Foreground execution, things work as expected. The problem here is that it requires me to be logged in to the server and I'd like this job like the rest of my Visual Cron job, without requiring and interactive session.
Does anyone have any ideas or thoughts that I can try out to get my Excel file to pull in the SharePoint data when run from Visual Cron? Thank you very much.