Excel Application Scope name excel file

Hi everyone,

I am about to learn how to work with UiPath and I am wondering how to automate the following example:
In every Excel Application Scope a Workbook bath has to be filled in.
Every time to robot is running i´d like to have the results stored in a different Excel File.
Is there a way to somehow name the workbook path or something else so that it works with a new Excel File?

Thank you for your help,

Rebekka

Hi @rebekka.haendel,

You can use variable in the filepath of Excel application scope.
If you need to change the path for each run, then you can keep the value in config or asset.
If it needs to be changed for each iteration during a run, then you can update the value of variable for each iteration.
Hope this helps!
Happy coding! :slight_smile:

Dear rebekka

u means u want to have data of excel file in other excel file
First use excel scope and use read range and store whole excel data in a dataTable variable
second use another excel Scope with path defined and then use write range activity.

Hope this will help u

Thanks
Sahil

Hi @Udhay,

Thank you for your respond.
Thought about using a variable as well.
What exactly would I have to put in the filepath of Excel application scope?

Hello @rebekka.haendel,
you need to put an file path to your file like ‘c:\documents\test.xlsx’
But you can use Assign activity with Array of String to store all files in your folder with this command:
System.IO.Directory.GetFiles(“C:\documents”,"*.xlsx")
Assign activvity:
https://docs.uipath.com/activities/lang-en/docs/assign

After that you can use For Each loop to pass through every document in folder.

You can check couple of solutions:

Cheers,
Dino

Hello @dfilipovic,

Thank you for your time and great help.

To make things clear: the following command ist what I need to type into the Workbook path of Excel Application Scope? System.IO.Directory.GetFiles(“C:\documents”,"*.xlsx")

I get erros with that.

Cheers,
Rebekka

Hi @rebekka.haendel,
you can find my solution to your problem here in zip document:
OpenMultipleExcel.zip (48.0 KB)

Cheers,
Dino

Dear Good Evening ,

i use your zipfolder and try to run the same file in my pc , but while running process i got same error

Excel Application Scope: Error opening workbook. Make sure Excel is installed.

uipath not recognized excel in my pc , what should i do now

refer my path :

“C:\Users\USER\OneDrive\Documents\UiPath\Excel Activity.xlsx”