cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1782
Views
5
Helpful
3
Replies

Running Excel Macro from Tidal Job

Hi,

Any one used Tidal job to run an Excel Macro?

I have an Excel Workbook which has a Macro set to run when the workbook is opened.

It runs without any issues when opening the file from Excel, from a batch file with Start Excel command, etc.

I need to run this Excel Macro from a Tidal job.

The Tidal job starts the excel and nothing happens after that. The Excel shows up in the Task manager and that is it.

Could it be any security warning or message box preventing the Excel to load the workbook and macro?

If so, how to prevent that?

Thanks,

Krish

3 Replies 3

Joe Fletcher
Level 1
Level 1

This is probably a windows security issue. Check the tidal service has all the necessary rights.

You might want to look at my recent posts on running powershell. They should cover most of the same issues.

 

 

You have both windows security and Excel's security setting to deal with. We typically do this with a bit of VB or VBscript and have Tidal run that process instead of doing it direct with the Excel command line. For higher security, a compiled VB executable to mask visible text VB script might be in order depending on the risk of knowing the files location.

See http://forums.techguy.org/business-applications/1020556-run-excel-word-macros-command.html for a VB script example.

Another version at http://stackoverflow.com/questions/2050505/way-to-run-excel-macros-from-command-line-or-batch-file

Fount the solution here:

http://stackoverflow.com/questions/22670344/powershell-script-cannot-access-a-file-when-run-as-a-scheduled-task

You have to create a folder (or two on a 64bit-windows):

(32Bit, always)

C:\Windows\System32\config\systemprofile\Desktop

(64Bit)

C:\Windows\SysWOW64\config\systemprofile\Desktop

I have had the same problem and this was the only solution i have found.

 

It works fine now.