Error in excel application scope macro

I have a macro which will filter two columns and fills the status in visible rows which is a third column.
one of the column will be sometimes empty. My code is working when there is empty column and also when there is data.
But it is failing when an empty column data is filled and if the next row is having data. Excel is failing, but in the same flow if there is another empty column it is working fine.
I tried kill process, delay retry updating package nothing is working can any one help me?
the error is
RemoteException wrapping UiPath.Excel.ExcelException: The remote procedure call failed. (0x800706BE) —> RemoteException wrapping System.Runtime.InteropServices.COMException: The remote procedure call failed. (0x800706BE)
at Microsoft.Office.Interop.Excel._Application.Run(Object Macro,
Object Arg1,
Object Arg2,
Object Arg3,
Object Arg4,
Object Arg5,
Object Arg6,
Object Arg7,
Object Arg8,
Object Arg9,
Object Arg10,
Object Arg11,
Object Arg12,
Object Arg13,
Object Arg14,
Object Arg15,
Object Arg16,
Object Arg17,
Object Arg18,
Object Arg19,
Object Arg20,
Object Arg21,
Object Arg22,
Object Arg23,
Object Arg24,
Object Arg25,
Object Arg26,
Object Arg27,
Object Arg28,
Object Arg29,
Object Arg30)
at UiPath.Excel.WorkbookApplication.ExecuteMacro(String macroName,
IEnumerable1 macroParameters) at UiPath.Excel.WorkbookApplication.InvokeVBA(String codeFilePath, String entryMethodName, IEnumerable1 entryMethodParams)
at UiPath.Excel.Activities.Business.InvokeVBAX.ExecuteDoWork(ActivityContext context,
ExecuteVBADescriptor descriptor)
— End of inner exception stack trace —
at UiPath.Excel.Activities.Business.InvokeVBAX.ExecuteDoWork(ActivityContext context,
ExecuteVBADescriptor descriptor)
at UiPath.Shared.Activities.BaseParentActivityWithDescriptor`2.OnCompleted(NativeActivityContext context,
ActivityInstance _)
at System.Activities.Runtime.ActivityCompletionCallbackWrapper.Invoke(NativeActivityContext context,
ActivityInstance completedInstance)
at System.Activities.Runtime.CompletionCallbackWrapper.CompletionWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Thanks

Hello @Nagini_Pragna

Sequence:
Delay: Delay for 5 seconds
Excel Application Scope:
ExcelFileName: “your_excel_file_path”
Workbook: WorkbookVariable
CloseWorkbook: true
Do:
Try:
Assign:
MacroFilePath = “your_macro_file_path”
Invoke VBA:
CodeFilePath: MacroFilePath
EntryMethodName: “YourMacroName”
EntryMethodParams: {}
Catch Exception:
Log Message: "Error executing macro: " & Exception.Message
Finally:
Excel Application Scope:
Workbook: WorkbookVariable
CloseWorkbook: true

Thanks & Cheers!!!

Thanks for reply I will try and check

1 Like

Hi This is also not working. I am facing same issue. Any suggestion will help

There is an issue in macro code, that’s why it is throwing error. Now the issue is resolved

Hi @Nagini_Pragna

Check whether the name of the method name and file path are corrctly passed or not.

Try by copying the macros code from notepad and delete the text file and create a new text file and paste over there.

delete the invoke vba activity and give again.

Hope it helps!!