Use Excel File Activity - Template

I am downloading an excel file from a website and while I am creating the automation, I do not have that file yet. So, I am instead using a template file. But, when I add the ‘Use Excel File’ activity, and include the file of path of the downloaded file from Step 1, and in the template, use the location of the template, it still shows the to be downloaded file in the next activity, For each excel row.

How can I change this?
Thanks!

Hi @Umesh_Ganesh

It would be recommended to use a variable with the range values instead.

Hello,
Use a variable(downloadedFilePath) instead of manually setting the path.
Ensure UiPath references the new file dynamically instead of using cached data.
Use conditions to switch between template and downloaded file if needed.

1 Like

Hi @Umesh_Ganesh

Whenever the file not exist which is given in Use excel file activity it will use the Template file to show range and structure of the excel for the excel activities which are using inside Use excel file activity.

Below is your reference,

Hope it helps!!

1 Like

@Umesh_Ganesh,

Template File is used only for design time convenience. While running or debugging your Excel File property file path will be used/processed.

Regarding you are looking for latest file from Downloads, you can use For Each File in Folder like below:

1 Like

@Umesh_Ganesh

If you remove the main file path that is when template file path is used and that is used only in design time and not in debug or runtime

cheers

1 Like

Hi @mkankatala, thanks for the reply!
so in that case, I should leave the main file area empty even if its mandatory to put something in there and only input the template excel file’s location under the ‘template’ option?
Just so you know, I am using the ‘Wait for download’ activity prior to the ‘Use Excel File’ activity

Hi @ashokkarale , thanks for the suggestion! I tried doing this and it started reading all excel files from my downloads folder. I am using the ‘wait for download’ activity before the ‘Use Excel File’ activity

Hi @Ruhi_Sayyad , thanks for your reply! Is there a way to make sure that UiPath is referencing the downloaded file dynamically instead of using cached data?

Thanks for the reply @Anil_G!

1 Like

Yes! Use the “Wait for Download” activity to ensure UiPath waits for the latest file. Then, fetch the most recent file dynamically

1 Like

No @Umesh_Ganesh , File path should be mandatory in Use excel file activity. You have to give output file path from Wait for download activity.

As @Anil_G mentioned and as referenced in the above reply, the template file path is only used during design time. Having the same file with the same structure is helpful when designing, as it allows you to reference range or sheet names for use in Excel activities.

Hope you understand!!

1 Like

Yes, got it! Thank you @mkankatala

It’s my pleasure… @Umesh_Ganesh

I hope you find the solution for your query. Make my post Mark as solution to close the loop.

Happy Automation!!

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