How to read and write in a Macro file

Hello Guys,

I have an Macro file, which I would like to open , I guess which could be done using start process activity. But then in that Macro I have 15 columns, out which I need
to write some values only in 2 columns.Could anyone guid eme a btit on this

Hi @kartik_sareen, Opening excel file with start process is not good practice. By using Excel Application scope you can connect your Excel macro file. (If you want to open the file - check Visible option in Properties, But its not required). Excel application scope activity supports .xlsm format as well. Here you need to write data in 2 columns only, You can do this in different ways.
1.Using Read Range activity Read the Data into DataTable then update the required columns, after that write the data in to the file by using Write Range Activity.
2. Using Write Cell Activity also you can do this.
Then if you want to execute the Macro, You can use Execute Macro activity inside the excel application scope and mention subroutine name in the Execute Macro.

Thanks…!

so , do you would like to run the Macro in the excel file from UIPATH ?

you can use "Excute Macro " from UIPATH.

or

if you would like to excute the MACRO when you open the exce file ?
(you should write the MACRO in the following manner …

Private Sub Workbook_Open()

End Sub

Thank u Ram…