Microsoft Excel cannot access the file 'D:\Automation\02_14_25_.xlsx' There are several possible reasons:
• The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.
C:\Windows\SysWOW64\config\systemprofile
and C:\Windows\System32\config\systemprofile\
but still same error.You did not clarify that the file: "D:\Automation\02_14_25_.xlsx"
Actually exists or if that is just the error message you could not correctly interpret.
In that case my answer would be: Your application is not started with the correct environment variables if it runs as a scheduled task. That is my classical mistake for the:
"It works when i run it manually but it doesn't when i do it with cron/scheduled task." - Scenario
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.