How to open multiple macro excel files

Hi experts,
I have more then 9 macro excel files . I’ll do some cut copy paste work in one into another excel macro file . which activity best to use open the excel file.
I need help friends.

Best

Hi @Abubakkar, use Excel Application Scope and use read range. It will open macro files.

TanQ,
Michael Udhaya

yes I already used this activity. but it’s not working my snario.

What kind of error you got bro?

Read Range: A column named ‘Unit’ already belongs to this DataTable.

I got this error buddy

If this error occurred, then your excel have two same headers (unit). Change it and try again bro!

This all excel data coming from client side how can I change it buddy?

So, create the New Datatable with Build Datatable activity with your modified excel. And read your excel file Without Headers and combine two Datatables. So you can get the same excel data with modified headers :wink:.

TanQ,
Michael Udhaya

1 Like

Thanks @Michael_Udhaya. I’ll try now.

@Abubakkar, Yeah it will happen when handling with more data. Instead of paste in the excel, you can add that data in the Datatable and write the whole data without open excel(uncheck the visible box).

If excel size was bigger, it was better idea to we handle it in the background.

Let me if work.

TanQ,
Michael Udhaya

The macro excel file will automatically open buddy I can’t do with out open excel file.
suggest me Is there any other option?

@Abubakkar, Use Excel Application Scope to read the excel.

In the Excel Application Scope uncheck the Visible check box in property pane. It will not open your excel. So you can read or write your Excel in background.

Don’t forget to close the excel with Close Workbook activity.

1 Like

buddy Is there any other way to see how to write in excel sheet possibly

Convert the excel sheet .xlsm to .xlsx. Do that your file size will be less. You can do simply when we use usually!

Well for these scenarios…we have an activity called INVOKE VBA where you can run a macro script… kindly follow the below steps that could

  1. Write all the macros in a text file…notepad
  2. use read text file and pass tha above notepad file path as input and get the output as a string
  3. Use excel application scope and pass the file name as input
  4. Use INVOKE VBA activity and mention macro function name in the macro property…
    For more info on how to use invoke vba activity…
    Kindly have a look on this
    https://activities.uipath.com/docs/invoke-vba

Cheers @Abubakkar

@Abubakkar

use copy paste Rage Activity

1 Like

were you able to run now buddy @Abubakkar

1 Like

No buddy till now struggling this part