I'm having a problem in getting two excel files from afolder

directory.getfiles(Filepath)
after i change the path its showing this error

@Pradeep_Shiv,

it saying the path is not correct. can you show how you providing the path.

@Pradeep_Shiv,

As per what I see, there is a problem in the IF condition.

what you can do is, check inside the for loop (without if condition) if all the files (be it xlsx\xls or something else) are being printed in the message box correctly.

Then you will get idea that how the files are recognized in your case. Then you can notice how the file name and extension is being displayed.

i tried using other format also

can you provide the me the path. what you have provide.

cheers,
Venky :slight_smile:

Directory.GetFiles(“C:\Users\Harsha\Desktop\MultipleFiles\Files”)

2 Likes

Fine along with this mention as
Directory.GetFiles(“C:\Users\Harsha\Desktop\MultipleFiles\Files”,”*.xlsx”)
To ensure that we get only xlsx file as I find like some other file is also getting included thats the issue

Cheers @Pradeep_Shiv

1 Like

@Pradeep_Shiv,

can you explain what you want to achieve,
the screen shots you provide were different.

with this path you will not get any issues. code should work smoothly.

ive two diffacerent excel files in a folder ,and ive to get data in each excel and search in web then get the data from web and save back in same files