Getting target invocation error in Invoke Code activity

Getting target invocation error in Invoke Code activity in the below code, can anyone help me what am i missing here.

Attaching the code and excel.
Note: excel has to be placed in desktopBook1.xlsx (9.6 KB) samplesarp.xaml (6.7 KB)

Can anyone help me on this.

You can instead use Excel Application Scope, put Read Range inside the scope, loop through the data rows and do something like Write Cell in any sheet, column and row.