Invoke Metod

Hello all!
I am learning invoke method.
I am trying to open excel using Invoke method .
But getting the following error.
Workflow3.xaml: ‘XLWorkbook’ does not have a public instance method named ‘Open’ matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod ‘Invoke Method’.

Can you please help to understand how it works?

@happyfeat87

To know usage please check this…dont try on excel open it would be difficult…as it needs so many other things

cheers

2 Likes

Can we use it to close the excel?
If Yes, How?

@happyfeat87

Ideally you would use by sending the already open workbook object…and then close method and close has all optional arguments so without arguments as well you can use

But you need a workbook object which already has one workbook open…

Its not a good idea to use this invoke method for that…its more to use when you have a method which does not give any return type and use it

Like add method on list

Pop from list etc

You can use for close as well but as said you need a workbook object which has the file open already

Cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.