VBScript with parameters is not working using Invoke VBScript activity

Hi Folks,

I have created a VBScript which copies and pastes the excel data of a certain range from one excel file to another excel file (Source excel file contains formulas and Cell color is also copied and pasted into the destination file). The VBScript accepts 5 parameters as listed below.

  1. SourceFilePath 2. DestinationFilePath 3. SourceSheetName 4. DestinationSheetName 5. SourceRange

When i run this code from command prompt it is working fine, but when i run it using “Invoke VBScript” activity it is not working. Kindly help me with solution.
Below attached the screenshot.

Hi @Mahesh5491

Could you please share the screenshot of arguments collecting inside VBScript.
It will give more insight on the issue.

Thanks

Hi Chetan,

Thanks for the response. Please find the screenshot below. Attached the VBscript in textfile as well.



VBScript.txt (1.7 KB)

Hi @Mahesh5491

The code and the VBScript call is looking perfect.

  1. could you please try by deleting the existing Invoke VBScript and re creating a new one.
  2. If 1st doesn’t work, try to upgrade or downgrade the package version and test.

Bcoz as I see, everything is perfect.

Thanks

What error message is it giving you?

Hi Chetan,

I tried Upgrading or downgrading to lower version, it’s still didn’t work. Any other ways to invoke VBScript code?

Regards,
Mahesh

Hi Senzo,

It doesn’t give any error.

Regards,
Mahesh

1 Like

you try to execute this via command line the if its works then add the event logs give full path of file in UiPath and try

@Mahesh5491

How did you decide it is not working without error? The required output is not present?

Also while passing argumnets can you try to pass like this

"""" + str_srcfilepath + """"

Replicate this for all parameters and check

Cheers