Read CSV: Could not find file erro

Hey guys.

I’m developing a robot that takes the last downloaded download from a folder and converts this file into xls (original file is in csv)

I created a variable that brings the most recent file. (new DirectoryInfo(foldername").GetFiles().OrderByDescending(Function(f) f.LastWriteTime).First().ToString.

I took this variable created and put it in the READ CSV function, for it to read the path and created the variable (excelformat)
but the error appears

Read CSV: Could not find file ‘C:\Users\guilherme.silva\Documents\UiPath\testsrename file\excelsalvo’.

what went wrong, can you help me?

I just wanted to turn csv into xls, and rename the last file just downloaded, as mentioned above.

sorry for the long text

@Guilherme_Silva - In the Read CSV activity … Remove the " " from the excelsalvo, Because the excelsalvo is variable, not a string.

still with the error

@Guilherme_Silva - Good…now its looking for the CSV file…

image

please show the screenshot of that file from the folder??

Yes true thank you! yeah, i wanted to read this latest recent file and turn it into xls

(arquivos valores separados) = csv

@Guilherme_Silva - I see the below file sitting here…But is the path in the error message is same as it looking??

In your query, you mentioned that you are downloading it to the Downloads folder…but in the error message path, i don’t see any “Downloads” at all…

Please check this post for reference…

wow thank you very much, i had done it that way, is that why the csv is not being read?

I wanted to transform this csv into xlsl

@Guilherme_Silva - For Converting CSV to XLS

image

Hey @Guilherme_Silva , just wanted to check here if you had any further questions regarding this issue or it has been resolved.

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