Easy Morph to run macro and schedule it every 2 hours

Hello,

Is it possible to run Macro using EM and schedule it to run every 2 hours?

Regards
Vaibhav

Hi Vaibhav,

You can use the PowerShell action to run a small PowerShell snipped as below:

$excel = new-object -comobject excel.application
$workbook = $excel.workbooks.open("C:\myfile.xlsx")
$excel.run("MyMacro")
$excel.quit()

Then schedule the project with the PowerShell action in EasyMorph Launcher.

Note that it may be necessary to prepend the macro name with the workbook name, e.g. MyWorkbook.MyMacro.

Hello @dgudkov,
Thanks this works fine!

But I am facing 2 challenges precisely on the project created. Let me first summarize the project I am running using EM:

  1. Through the above powershell help I am running a macro to fetch the emails from my mailbox.
  2. Then I create a table by using the ‘Excel worksheet’ as a datasource.
  3. Table is created.
  4. Table is exported to Amazon redshift Cluster

I am facing issues at 2 and 4 steps.

2 Step - There are columns where we want date and timestamp but data is not giving the right timestamp. It has constant 12:00:00

4 Step - Data is exported successfully but there are many ‘nulls’ coming in table exported in between.

What could be the reason for same?

Regards
Vaibhav

Try using the “Fetch email” action available in EasyMorph.

Not sure how I can help with the rest of issues.

I have a customised macro that fetches lot of information, with ‘Fetch emails’ I dont get all the information I seek.

I will try and see if I can resolve the ‘nulls’ in export table command.