Multiple excel file with diffrents names


I’ve 2 excels files. From those excels files i copy the data inside, than row per row i past that data in a new file.

The thing is that from for each row i ve to make a new file. Means seperate files for each row from the 2 first files. Of course will be based on one of them to follow the row numbers…

Any idea on how to proceed ?

@YAZIDI mosa3ada :smile:


You can do it with Invoke VBA :

First call a Excel Application Scope, with a random xlsx file, and inside this excel app scope, use the Invoke VBA Activity, get the result as an Object that you can convert to string array (if needed) with :

CType(result, String())

Good luck :slight_smile:

1 Like

Hi @Damien

Thanks for u response!

But that’s not what i’m looking for, i need to read the files and get the data inside wish i use it row per row on each time a new excel file.

1 Like

Ok, I’m pretty sure that you still can do this using VBA but lets try with UiPath.

I would proceed like this :

First extract the first excel file with a read range to a first DataTable.
I’ll do the same with the second excel file.

And then use two for each row to loop through the two extracted DataTable and push the content on your new excel file.

Create and fill a new Excel file with WriteRange from Excel Activity :

1 Like

Hello @mz3bel,

Maybe this will help:Foreachrowcreateafile.xaml (7.0 KB) Dates.xlsx (11.3 KB)

Cheers :upside_down_face:

1 Like

Hello @YAZIDI,

Not exactly, for example i have a.xlsx and b.xlsx, wich each one of them has data inside. I get the first row from both of the files, than use that data to fill an existing excel file on specifics cells (Bill/Fatcure). Than save that file with the name “Bill-DATE-Number-1”… etc until no more rows found on the a or b excel file.

Thank you in advance @YAZIDI

Hi @mz3bel,

I suggest to use Copy File inside a loop to copy the existing excel file while renaming it to “Bill-DATE-Number-1” then fill it with the data you retrieve.
As for the loop you can use the following: 2Excel1Loop.xaml (7.4 KB)


Done by using Merge Data Table :slight_smile:

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