How to save excel files with different names or number? + Additional questions

Hi,

I am new to UiPath Studio and I am currently a intern at a local company. Is there anyway to save new excel files with different names or a number in order 1, 2, 3, etc? Last question, if I have a folder contains lots of excel files, what are some ways to open each of the files one by one dynamically without using Excel Application Scope. Any attachment of workflow, solution or xaml file will be gladly accepted!

Thanks!

1 Like

Hi @phoenix123,

You can create new excel files dynamically by inserting today’s date and time
Ex:filename+_DateTime.Now.ToString(“dd-Mm-yyyy hh:mm:ss”)

Thanks,

1 Like

@phoenix123

  1. create one counter variable of type integer and increment it in the loop. And pass like this to create Excel file: “Excel-”+counter.Tostring+“.xlsx”

  2. use Directory.GetFiles(“FolderPath”) to read files from particular folder and will give result of type String array and iterate it using For Each loop and pass it to Start Application activity to open one by one file.

5 Likes

@lakshman hi sir, do you have any example like the workflow or .xaml file?

@phoenix123,

For your reference, Please find the attached workflow and it has answers for both questions. Just change the folder path and run it.

If you face any issues then let me know.

Flowchart.xaml (12.3 KB)

5 Likes

@lakshman thank you sir! I will work on it right away!

2 Likes

@phoenix123

Have you tried above solution ? Is it working for you ?

If yes then mark it as solution and will help others too…

1 Like

@lakshman sorry sir was doing other task right now I can’t find the String in my UiPath for my own workflow but for your case have! I can find the System.String but without the array.

@lakshman sorry my bad. I found out where to click.

@lakshman thank you sir for your effort and your solution! It really work for my use cases! Thank you once again!

1 Like

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