Convert csv file to xls downloaded from browser, no fixed name

I need to convert a downloaded csv file to .xls.
this file is downloaded from the internet and its name is dynamic it has no fixed name

for example: I downloaded the csv file from the browser and wanted it to be in .xls
would anyone know?

you can get the csv file name by using -

(new DirectoryInfo(strDownloadPath)).GetFiles().OrderByDescending(function(x) x.LastWriteTime)(0).Name.ToString

where strDownloadPath is the download path of your browser

then you can read the csv file into DataTable and then Write it to an excel.

ConvertCSVToXls.xaml (5.0 KB)

Hi @Guilherme_Silva , Try this invoke code.