how to select second excel file from a folder.
Hi @mu_nazza ,
Try the below :
Directory.GetFiles("YourFolderPath","*.xlsx")(1).ToString
We might need to Perform Validation first if the excel files are less than 2 present in the Folder, we can do it like below :
if(Directory.GetFiles("YourFolderPath","*.xlsx").Count>1,Directory.GetFiles("YourFolderPath","*.xlsx")(1).ToString,"No Second Excel File Found")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.