Invoke Vba on .xls file

Hi,
I have tried invoke vba on .XLS file. The data in the files starts from C3. I want to change the format for W column. So i have given VB script in the txt file. Please find the below script

Function Macro1(r)
Columns(r).Select
Selection.NumberFormat=“0”
ActiveWorkbook.Save
End Function.

In the Invoke VBA activity, given the .txt path.
EntryMethodName=“Macro1”
EntryMethodParameters = {“”+“W:W”+“”}

I have debugged the Invoke vba activity. it has done the required operations, but as soon as it comes out of the Excel application scope, The format is getting into the initial format and also the data has moved into B1 whereas the initial data is from C3.

Please help, Thanks in Advance.

I hope you are using Save As ?

@Nithinkrishna I have given ActiveWorkbook.Save in the script

can you upload the excel file here ?

and also upload your uipath .xaml file

@Konda_Sai_Charan_Goud

Yes but I believe you are running the script externally right I mean the script is not saved inside Excel?

@Nithinkrishna yes

Hi @Konda_Sai_Charan_Goud,

Can you share your flow or screenshot?

Does it work the way you want when you try it manually?

Regards,
MY

@jack.chan
MacrosInXSL.7z (24.0 KB)