I need an urgent support to solve problem below:
I have 1 excel file. I took a screenshot. Then, I add new slide includes excel sheet image.
Now, I try to automate when new excel file added, 2nd slide should be created. And, when 3rd excel file added 3rd slide should be created.
What should I do?
My current flow is below:
My plan is to create a specific folder.
And in excel application scope, I need to write dynamic path but how?
Then in save image activity, I need to give dynamic image file name but how?
Then, insert slide and picture, I need to add slide below previous one but how?
Any idea or help is more than welcome for me.
I think u can approach the following way:
first take the count of excel sheets, then take the last sheet out of that collection based on count
check the slide count using the slide count activity in balareva activities package
now compare the slide count and excel sheet count,
if slide count<excel sheet count
take the screenshot of new excel sheet
then create a new slide using the insert slide activity and add add the screenshot in it.
This is way you can deal with it
Let me know if you had any questions
Thanks & Regards,
Thank you Nived.
All excel files are the same. And there is one sheet which I get screenshot.
First I need to create a folder. When I put 2nd excel file, I need to do same operations to new excel file. Then, it will be added next slide.
I think you reccomend me,
- Read all excel files
- collect sheet to 1 excel file
- Try to create slide according to sheets
Do I understand right?
Sorry i think i had misunderstood ur process, i thought that you are adding excel sheet in single excel file
If it is wrong could you please explain the process properly so that i can help in resolving the issue?
At the begining I have excel file_1. And 1 powerpoint collections. I have already 1 slide before.
When I click run on Uipath, Screenshot is taken from excel1 and inserted to slide2
When I added excel file_2 in folder, screenshot should be taken and inserted to slide3 in ppt.
So, if I added excel file-3, slide4 should be created with respect to new excel file and no update on previous slide.
Ok got it now
I can recommend the following path to create the workflow
Create two folders input & output folders for storing the excel files.
Place the excel files u need to add in slide in input folder, once the details in slide are added, we can make the bot to move the excel file to output folder
for developing purposes, u can approach the follwoing way
- use the assign activity to get the file paths present in input folder and store in array
now loop through each excel file using for each loop,
inside the loop do the following:
a. Open the excel file and take the screenshot of sheet
b. Insert a new slide and then place the screenshot to it
c. once done, move the excel file to output folder
This is the logic u can try
let me know if u had any questions
Divide your folders into Input and output and place excel in Input and PPT in output.
String.Join(“”,Directory.GetFiles (“YourFolderPath”,”*”,SearchOption.AllDirectories).OrderByDescending (Function(d) New FileInfo(d).CreationTime).Take(1) )
This will give you the latest excel file added in the folder when you trigger bot and take screenshot and add it to PPT.
It is worked. But now there is one problem. It writes on 2nd slide. Now I am trying to solve dynamic slide index. I try to increase slide number with respect to number of excel file.
If any suggestions to fix it, I will complete my flow in one day. Then, I will work on slide design.
Thank you very much.
It was my first post and I am very grateful
Take Number of Files in Input as Array of Strings each time and take count of files using var_arrstring.Length and pass as dynamic value for Slide Index.
Mark solution if works!
Thanks a lot for quick support @Pramod @NIVED_NAMBIAR .
It was very helpful.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.