Hi,
I have referred to the above post for fetching latest csv file and converting it into Excel workbook
But i am geting the CSV extension every time which is causing issue for me
Input Argument : String.Join(" ",Directory.GetFiles(Folder_Path,”*.csv”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1))
Output Argument : String.Join(" ",Directory.GetFiles(Folder_Path,”*.csv”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1)) + “xlsx”
Sorry, you are correct. It only returns the filename without the path. Path.ChangeExtension() is the function you should be using instead.
Path.ChangeExtension(String.Join(" ",Directory.GetFiles(Folder_Path,”*.csv”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1)), “.xlsx”)