I have a macro that processes data and outputs three datasets, which I need to write to the same excel workbook into different sheets. When I had the code running as a normal workflow, I was able to get BlockUntilDone to work properly.
I converted my workflow to a batch macro with three outputs and I am trying to write the macro outputs to Excel using BlockUntilDone from the workflow where the macro is called. But only one sheet gets written and I get errors for the other two. I also tried placing the BlockUntilDone inside the macro just before the Output tool, but that doesn't work either. Can somebody please guide me here?
Thanks.
Edit: Adding some screenshots of the macro and the workflow

Macro called in workflow
Macro
One of three outputs within the macro